06 - User Authorization in Laravel

Поделиться
HTML-код
  • Опубликовано: 30 авг 2021
  • A look into authorizing user actions in #laravel.
    Documentation:
    laravel.com/docs/8.x/authoriz...
  • НаукаНаука

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

  • @user-ii6yg3lf1v
    @user-ii6yg3lf1v 8 месяцев назад

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

  • @GreatCaleb
    @GreatCaleb 2 года назад +1

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

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

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

  • @RehmanKhan-zv2rl
    @RehmanKhan-zv2rl 2 года назад +1

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

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

      You're welcome :)

  • @narens9261
    @narens9261 10 месяцев назад

    Thank you, great tutorial

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

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

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

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

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

    Thanks Mohamed From Morocco

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

    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?

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

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

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

    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 2 года назад

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

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

    Thanks a lot, bro.

  • @lyawileh.a8741
    @lyawileh.a8741 2 года назад

    Cool, descriptive

  • @ArjonJasonCastro
    @ArjonJasonCastro 2 года назад +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 2 года назад +1

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

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

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

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

    Thank you :)

  • @GergelyCsermely
    @GergelyCsermely 2 года назад +1

    Thanks

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

    thank you

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

    Nice.

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

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

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

    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.

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

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

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

    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 2 года назад

    +