It's posiible to add multiple middlewares inside one group route Route::group(['middleware' =>[ 'protectedPages', 'AnotherOneHERE']], function () { // Add your routes HERE Route::view('users', 'users'); Route::view('home', 'home'); });
Hy, I am from Pakistan. The way of your teaching is outstanding Thank you, sir, it's my honor to learn from you. Normally when seeing something like these tutorials I download them and watch them offline. But what I can do for your channel is I am watching all your tutorials online so your watch time may be increased. please accept respect.
Hi sir .i have a question.I use Laravel 8. I want to disable middleware for specific funktions in resource controller.(lets say member resource controller) For example a user who hasnt registered yet should be able to use the member.store(for the new registration to be stored in the db) ,member.index,but not the member.edit or member.softDelete etc... I hope my question is clear. Thank you in advance!
Hey I am getting error when I execute the url localhost/firstproject/public/users/?age =40 As errorException Trying to get property headers of non object
//case 1: Code will work Route::group(['middleware' =>['pageOne']], function(){ Route::view('page1', 'page1'); }); //case 2: code will not work Route::group(['Middleware' =>['pageOne']], function(){ Route::view('page1', 'page1'); }); //Code 3: code will not work Route::group(['MIDDLEWARE' =>['pageOne']], function(){ Route::view('page1', 'page1'); });
Please Support me subscribe, Like and comment 😊
It's posiible to add multiple middlewares inside one group route
Route::group(['middleware' =>[ 'protectedPages', 'AnotherOneHERE']], function () {
// Add your routes HERE
Route::view('users', 'users');
Route::view('home', 'home');
});
Hy, I am from Pakistan. The way of your teaching is outstanding Thank you, sir, it's my honor to learn from you. Normally when seeing something like these tutorials I download them and watch them offline. But what I can do for your channel is I am watching all your tutorials online so your watch time may be increased. please accept respect.
Yes it's possible. just specify the middleware name as array. 'middleware' => ['middleware1', 'middleware2']
yes we can use multiple middleware bcz passing it in " [] " which indicates as array
Yes , its possible to add them , just as we can check for two conditions in the if statement. We ust need to add it as an array
Interview question :
Yea we can write it. (Middleware mentioning for grouped route with in the array brackets.)
yes you can use two group route at the same time
thanks👍👍👍👍
owesome tutorial
Since it is an array or collection, It is possible to add more than one middleware.
Awsome👍👍👍👍
Hi sir .i have a question.I use Laravel 8. I want to disable middleware for specific funktions in resource controller.(lets say member resource controller)
For example a user who hasnt registered yet should be able to use the member.store(for the new registration to be stored in the db) ,member.index,but not the member.edit or member.softDelete etc... I hope my question is clear. Thank you in advance!
When or where do I use that? Is that like if you are not login?
Yes we can use the two middleware routes
what is advantage of middleware
can this possible to use or condition in group ?
check admin or superadmin middleware
Yes, we can use two Route or two middleware with the single group Route.
yes we use. if i am wrong please correct me
Hey I am getting error when I execute the url localhost/firstproject/public/users/?age =40
As errorException
Trying to get property headers of non object
yes
yes can write .
Sir, Middleware name should start with capital letter or not?
//case 1: Code will work
Route::group(['middleware' =>['pageOne']], function(){
Route::view('page1', 'page1');
});
//case 2: code will not work
Route::group(['Middleware' =>['pageOne']], function(){
Route::view('page1', 'page1');
});
//Code 3: code will not work
Route::group(['MIDDLEWARE' =>['pageOne']], function(){
Route::view('page1', 'page1');
});
how to create user and admin auth with middleware?
Interview question:
Yes we can use two middlewares in the group array
React project need