D
D
Denis Bukreev2017-09-30 16:33:04
Laravel
Denis Bukreev, 2017-09-30 16:33:04

Is it possible to assign a proxy to a group of routes in laravel?

So it goes.

Route::prefix('owner')->group(function () {
    // routes
})->middleware('owner');

With this state of affairs, laravel gives me advice: "Call to a member function middleware() on null"
It turns out that I have to set an intermediary for each route inside the group?
Or is it still possible to assign it to a group?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Pushkarev, 2017-09-30
@denisbookreev

Route::group(['prefix' => 'owner', 'middleware' => 'owner'], function () {
   // ...
});

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question