View Component is Orchestra Platform approach to deliver themeable application that support extensions. The functionality evolves by modifying how Illuminate\View\ViewFileFinder
would resolve which file, which would first look into the current active theme folder, before resolving it cascading-ly.
This would allow extension (or even packages) to have it's own set of view styling while developer can maintain a standardise overall design through out the project using a theme.
Laravel | View |
---|---|
5.5.x | 3.5.x |
5.6.x | 3.6.x |
5.7.x | 3.7.x |
5.8.x | 3.8.x |
6.x | 4.x |
7.x | 5.x |
8.x | 6.x |
To install through composer, run the following command from terminal:
composer require "orchestra/view"
Next add the service provider in config/app.php
.
'providers' => [
// ...
Orchestra\View\DecoratorServiceProvider::class,
Orchestra\View\ViewServiceProvider::class,
Orchestra\Memory\MemoryServiceProvider::class,
],