Laravel 8 tutorial - Group middleware

Поделиться
HTML-код
  • Опубликовано: 8 ноя 2024

Комментарии • 27

  • @codestepbystep
    @codestepbystep  2 года назад +3

    Please Support me subscribe, Like and comment 😊

  • @dannielmagano790
    @dannielmagano790 4 года назад +48

    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');
    });

  • @zulfiqaralikhan3227
    @zulfiqaralikhan3227 3 года назад +7

    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.

  • @biplobshaha2829
    @biplobshaha2829 2 года назад +2

    Yes it's possible. just specify the middleware name as array. 'middleware' => ['middleware1', 'middleware2']

  • @hemantkengeri315
    @hemantkengeri315 3 года назад +2

    yes we can use multiple middleware bcz passing it in " [] " which indicates as array

  • @matianyanzi3943
    @matianyanzi3943 2 года назад

    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

  • @freerelax8964
    @freerelax8964 4 года назад +4

    Interview question :
    Yea we can write it. (Middleware mentioning for grouped route with in the array brackets.)

  • @gyamfijohn3066
    @gyamfijohn3066 8 месяцев назад

    yes you can use two group route at the same time

  • @erriada-com
    @erriada-com Год назад

    thanks👍👍👍👍

  • @pradipbaselatwork4449
    @pradipbaselatwork4449 2 года назад

    owesome tutorial

  • @ollaray1
    @ollaray1 3 года назад

    Since it is an array or collection, It is possible to add more than one middleware.

  • @TherealEmemay
    @TherealEmemay 2 года назад

    Awsome👍👍👍👍

  • @keremoz9531
    @keremoz9531 3 года назад

    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!

  • @solidcat3917
    @solidcat3917 4 года назад +2

    When or where do I use that? Is that like if you are not login?

  • @ShoaibBadshah
    @ShoaibBadshah 3 года назад

    Yes we can use the two middleware routes

  • @SiriReddy-2282
    @SiriReddy-2282 Год назад

    what is advantage of middleware

  • @hardikpatel640
    @hardikpatel640 4 года назад

    can this possible to use or condition in group ?
    check admin or superadmin middleware

  • @lazyant504
    @lazyant504 4 года назад

    Yes, we can use two Route or two middleware with the single group Route.

  • @NotBeHaris
    @NotBeHaris 4 года назад

    yes we use. if i am wrong please correct me

  • @tanyanebhwani
    @tanyanebhwani 2 года назад

    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

  • @sujonhossain3250
    @sujonhossain3250 Год назад

    yes

  • @delowerhossain493
    @delowerhossain493 3 года назад

    yes can write .

  • @ariyansgroup
    @ariyansgroup 2 года назад

    Sir, Middleware name should start with capital letter or not?

    • @amberbdr8168
      @amberbdr8168 2 года назад

      //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');
      });

  • @alifpaizar9709
    @alifpaizar9709 3 года назад

    how to create user and admin auth with middleware?

  • @harshjain4256
    @harshjain4256 3 года назад

    Interview question:
    Yes we can use two middlewares in the group array

  • @shocchosolutions6275
    @shocchosolutions6275 4 года назад +1

    React project need