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?



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2Psy1Mk
via IFTTT

Aucun commentaire:

Enregistrer un commentaire