Closed wangchristine closed 2 years ago
Maybe Closure middleware like that aren't supported in Lumen? Feels a bit like a breaking change to modify this method?
Got it. Thank you for reviewing my pull request. So is it possible support closure middleware in Lumen in future? Why Lumen doesn't support but Laravel does? Is it because creating class instead of using closure causes less memories? Just curious.
Hi, I found a bug for Lumen 9 version(other version may have same problem) when I was defining middleware in controller. I have a controller like this: app/Http/Controllers/ExampleController.php:
And when I'm using
app()->make('App\Http\Controllers\ExampleController')
for getting this controller middleware property when writing my own package, this got an error:Because this middleware is a Closure. So I changed code and sent this pull request for it. Let me know if I am wrong or correct, thanks.