Last active
February 16, 2017 06:21
-
-
Save Mombuyish/7e1f384be742d3c2d8068410ee34bedd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Providers; | |
use Illuminate\Support\Facades\View; | |
use Illuminate\Support\ServiceProvider; | |
class ComposerServiceProvider extends ServiceProvider | |
{ | |
/** | |
* Register bindings in the container. | |
* | |
* @return void | |
*/ | |
public function boot() | |
{ | |
// Using Closure based composers... | |
// Here is a simple example... | |
View::composer('collections.index', \App\Http\ViewComposers\AllPostComposer::class); | |
} | |
/** | |
* Register the service provider. | |
* | |
* @return void | |
*/ | |
public function register() | |
{ | |
// | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment