[Bug] web_middleware list causes errors
See original GitHub issueIn https://github.com/Laravel-Backpack/CRUD/issues/3094, @pxpm gave me some suggestions about this.
However when I check the code, I still feel confused.
In https://github.com/Laravel-Backpack/CRUD/blob/master/src/config/backpack/base.php, there are two middleware groups, one is admin
, and another one is web
.
As you can see, in https://github.com/Laravel-Backpack/CRUD/blob/master/src/routes/backpack/custom.php, the route loads both web
and admin
middleware groups.
So the problem is, @pxpm 's solution works for the admin
middleware group only, if I want to make a custom array for web
middleware in /config/backpack/base.php
, it would cause errors. And also, modifying web_middleware
to array object is what the code recommends me to do (please look the comments in the code)
_Originally posted by @hirakujira in https://github.com/Laravel-Backpack/CRUD/issues/3094#issuecomment-669015458_
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (5 by maintainers)
Top GitHub Comments
@hirakujira Thank you very much for submitting the bug report.
Indeed at first I did not fully understand your question, my bad, sorry for that.
I acknowledge the error your are facing and submited a PR: #3134 that I think would fix this.
It would be super if you could try out my solution on that PR and let me know there if it fixed your problem.
Do not forget
php artisan config:cache
andphp artisan cache:clear
just to make sure you pick up the correct config.I am going to close this as we have a solution for it in #3134 and it’s better to keep any discussion related with this in that thread.
Once again, sorry for not understanding at first your issue and for the frustration of following the documentation and it didn’t work.
Hope we fix this for good 😃
Wish you the best, Pedro
Yes this fixed the issue. Thank you so much!