jeudi 21 février 2019

How to set exception in the Routing Route::resource inside Route::group, in Laravel 5.7

I have a question about routing. I have a Route::resource inside Route::group which apply a middleware.

in the route file: route/web.php

Route::group(['middleware' => 'is_admin'], function() {
  Route::resource('products', 'ProductController');
});

Now, I need to exclude 'index' and 'show' methods from middleware. How do I achieve that? Thanks in advance!



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire