Imphusius Imphusius - 1 year ago 85
PHP Question

Make:middleware doesn't work

In PHP Artisan when I put command:

php artisan make:middleware MiddlewareName

I get error like this:

[37;41m [39;49m
[37;41m [BadMethodCallException] [39;49m
[37;41m Method filter does not exist. [39;49m
[37;41m [39;49m

Could anyone explain me where the problem is?
Thank you

Answer Source

Sounds like you're using a filter somewhere in your routes.php file. Remove it and then call the command again.

I believe filters were depreciated in 5.1 then removed in 5.2.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download