In laravel, we can call multiple Middlewares in Controller file and route file.

1. In Controller file, you can call like this.

public function __construct() {
   $this->middleware(['revalidateBackHistory', 'validateUser']);
}

2. In route file, you can call multiple middleware like this.

Route::get('/', function () {
  //
})->middleware(['firstMiddle', 'secondMiddle']);

Suggest An Answer

No suggestions Available!