akaunting/laravel-firewall

installation error

rabol opened this issue · 2 comments

rabol commented

New project based on latest Laravel 7

Command:

composer require akaunting/firewall

error:

Argument 2 passed to Illuminate\Routing\Router::middlewareGroup() must be of the type array, null given, called in /home/vagrant/code/xxx/vendor/akaunting/firewall/src/Provider.php on line 60

rabol commented

quick fix:

in the Provider.php, method: registerMiddleware

        $all = config('firewall.all_middleware');
        if(is_array($all) && count($all))
            $router->middlewareGroup('firewall.all', $all);

Feel free to contribute as PR.