davestewart
12/23/2014 - 1:34 PM

Get current template name in Laravel Blade.

Get current template name in Laravel Blade.

// allow $view_name in views
View::composer('*', function ($view) {

    View::share('view_name', $view->getName());

});