for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace PeterColes\Themes;
use Illuminate\Support\ServiceProvider;
class ThemesServiceProvider extends ServiceProvider
{
/**
* Perform post-registration booting of services.
*
* @return void
*/
public function boot()
$this->publishes([
__DIR__.'/../config/themes.php' => config_path('themes.php'),
]);
}
* Register any application services.
public function register()
$this->registerViewFinder();
$this->registerThemes();
* Re-register the view finder to use use local copy.
protected function registerViewFinder()
$this->app['view.finder'] = $this->app->share(function($app) {
$paths = $app['config']['view.paths'];
return new FileViewFinder($app['files'], $paths);
});
// Apply this finder to the already-registered view factory
$this->app['view']->setFinder($this->app['view.finder']);
* Register the themes service.
protected function registerThemes()
$this->app->singleton('themes', function() {
return new Themes;