I am using larave 5.2
I need to apply middleware route
Controller
public function __construct() {
$this->middleware('auth',['only'=>'profile.create']);
}
Route
Route::group(['middleware' => 'web'], function () {
Route::auth();
Route::get('/home', 'HomeController@index');
Route::resource('profile','ProfiledetailsController');
});
When I use below code it works, but middleware applied to all the method of the controller
public function __construct() {
$this->middleware('auth');
}
route:list
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/20brNK0
via IFTTT
Aucun commentaire:
Enregistrer un commentaire