06 - User Authorization in Laravel

Sdílet
Vložit
  • čas přidán 6. 09. 2024

Komentáře • 27

  • @user-ii6yg3lf1v
    @user-ii6yg3lf1v Před 10 měsíci

    To be honest this is the best 11 minutes worth to watch

  • @developer_sagor
    @developer_sagor Před 3 lety +4

    Thanks sir, it's was great video and it's very easy to understand. Thank you very much :)

  • @GreatCaleb
    @GreatCaleb Před 3 lety +1

    Thank you sir.. your explanation is easy to understand.

  • @RehmanKhan-zv2rl
    @RehmanKhan-zv2rl Před 3 lety +1

    Hey Sir! that's a great effort and a great opportunities for those who wants to learn laravel. Thanks,

  • @lahoucineoldakdim7778

    Thanks mohamed.
    For checking two moleds i prefer to use this:
    $user->is($post->user);
    Or:
    $user->isNot($post->user);

  • @debjit21
    @debjit21 Před 3 lety +2

    Awesome. Please add test (API, web) and sanctum

  • @ossamaelidrissi2624
    @ossamaelidrissi2624 Před 2 lety

    Thanks Mohamed From Morocco

  • @ArjonJasonCastro
    @ArjonJasonCastro Před 3 lety +1

    Hi Mohamed,
    Thank you and to the Laravel Team for this great video.
    Btw I sent a DM for you in Discord. I hope it is alright :-)

    • @themsaid
      @themsaid Před 3 lety +1

      Hey. I don't open Discord a lot :) Catch me on twitter @themsaid

    • @ArjonJasonCastro
      @ArjonJasonCastro Před 3 lety

      @@themsaid Yeah. I also sent the message in your twitter as well ;-)

  • @narens9261
    @narens9261 Před rokem

    Thank you, great tutorial

  • @GergelyCsermely
    @GergelyCsermely Před 3 lety +1

    Thanks

  • @mahmudulhasan1360
    @mahmudulhasan1360 Před 3 lety

    Thanks a lot, bro.

  • @lyawileh.a8741
    @lyawileh.a8741 Před 2 lety

    Cool, descriptive

  • @mohamadcheaib
    @mohamadcheaib Před 3 lety

    Is their any way to use gates directly on routes while using resource routes, or we should check each gate inside the controller?

  • @ArjonJasonCastro
    @ArjonJasonCastro Před 3 lety

    Hi Mohamed,
    Sorry to message you here, but, I replied to you on our Twitter conversation. Thanks a lot. 😊

  • @vlauciani
    @vlauciani Před 3 lety

    Thank you very much for this great video.
    Could you explain what is the best practice to use 'tokenCan()' in combination with Gate and Policy?

  • @myosotisalderson
    @myosotisalderson Před 2 lety

    Thank you :)

  • @Meinungsmacher
    @Meinungsmacher Před 2 lety

    thank you

  • @rezamortezaie5377
    @rezamortezaie5377 Před 3 lety

    Thank you a lot for your clear and understandable videos. I have a question. With many to many relationships between an Author and Tag models, how to authorize an Author to update tags in policy?

    • @rezamortezaie5377
      @rezamortezaie5377 Před 3 lety

      For example, is this right? $author->id === Tag::with('author')->pluck('id'); ??

  • @mzeeshanzafar28
    @mzeeshanzafar28 Před rokem

    Am I the only one or someone else also noticed the "son of a beach" drawing in the background ?
    😂

  • @hiajayy
    @hiajayy Před 3 lety

    Nice.

  • @galiathussaga2633
    @galiathussaga2633 Před 2 lety

    Hi sir can you make a tutorial how to create a reward Points system. The new user will have a default point and the admin can give them points and the user will use the point to redeem a item and also display total points.

  • @ilyasszamouri
    @ilyasszamouri Před 2 lety

    The explanation of whether the user is admin is a little big foggy. Let me explain it the user should have a column named role. If you already has the migration up and running just do this: php artisan make:migration adding_role_to_users_table --table=users then define the role $table->boolean('is_admin'); like so and if you'd like to have multi roles add the role column as a string then think of keys for each role name.go to the fillable and add the role. Now back to the PostPolicy you check whether the role is Admin or not or what ever role you want to check.

  • @dmitriykret8938
    @dmitriykret8938 Před 2 lety

    +