vendredi 29 juin 2018

Run command get error in AppServiceProvider

I run command and get error "Call to a member function getAction() on null" in AppServiceProvider.
If i comment it, command run ok. My AppServiceProvider.php :

app('view')->composer(['layouts.admin-app', 'admin.*'], function ($view) {
            $action = app('request')->route()->getAction();

            $controller = class_basename($action['controller']);

            list($controller, $action) = explode('@', $controller);
            $controller = str_replace('controller', '', strtolower($controller));

            $view->with(compact('controller', 'action'));
        });

I researched many hours but still not able to solve it.



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

Aucun commentaire:

Enregistrer un commentaire