Closed DesolatorMagno closed 4 years ago
Thanks for reporting. Currently, it is coded to work with namespace()
method calls only. I will check for this.
I have made the change to allow the routes inside the group to still work when the closure is the 2nd attribute.
But, supporting the namespace from an array requires extra efforts. Noting that this way of defining groups in not specified anywhere in the Laravel documentation, I would suggest to write route groups as per the documentation : Route::namespace('Admin')->group(function() {...
Thanks.
Well, in reality it is in the current version of the documentation for middleware and i see it pretty often. https://laravel.com/docs/7.x/middleware#middleware-groups
Thanks for sharing Reny. I had checked only the Route groups page and said full laravel documentation
sorry. I can go for this probably in the future. Although, there are other features pending with priority.
I found that the feature Route -> Controller is not working for me when the routes are inside a group that applies a middleware, or other options, and have a function call back
Route::group(['middleware' => ['auth']], function () { // });
As a side note, i tried separating it into 2 group and it did work as intended.
Route::middleware(['auth'])->group(function () { // });