A
A
Arthur2018-10-15 20:49:01
Laravel
Arthur, 2018-10-15 20:49:01

Middleware except in route group?

Good evening.

Route::group(['middleware' => 'middlewareName'], function () {
Route::get('/', '[email protected]');
Route::get('/about', '[email protected]');
})

How to add middleware except for [email protected] method?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2018-10-16
@ART_CORP

In the mediator itself, have you tried adding the /about route to $except?

N
netrox, 2018-10-15
@netrox

Just remove this method from closure.
Or in the constructor of the controller

$this->middleware('middlewareName')->except('about');

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question