vendredi 30 août 2019

Add an all views wilcard to view composers from within a laravel package

I have a view composer working from within a package for a specific directory:

$view->composer(
        'cms::admin.*', ProfileComposer::class
    );

But I also have view composers that should be loaded across all root views, however the following are not being loaded as required:

$view->composer(
            'cms::*', NavigationComposer::class
        );

        $view->composer(
            'cms::*', SiteConfigComposer::class
        );

Any idea how to apply these view composers to all routes?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire