Detecting Model Changes After Persistence - Laravel

Поделиться
HTML-код
  • Опубликовано: 19 май 2021
  • A look into detecting changes of model attributes after the model is persisted to the database.
  • КиноКино

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

  • @TeenaCode
    @TeenaCode 3 года назад +3

    I like tutorials like this that teach you the core of the framework (hidden gems), rather than introducing endless streams of packages.
    Thanks Said!

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

      Glad you like it. I try to avoid packages if possible in my apps.

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

    Having done a little work in .NET, I've grown to appreciate checking for dirty attributes. Checking for changed attributes after the model is persisted - that's pretty sweet!

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

    Awesome explanation! This knowledge came at the right time, since I'm starting to build a custom audit system for my clients!
    I'm glad to see you posting new videos, hope to see more from you!

    • @themsaid
      @themsaid  3 года назад +1

      Glad it was helpful! :)

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

    Awesome brother, we've been facing the same problem and this trick will be fix it.

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

    Really good one, but I like the observer moree.

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

    Useful video thanks Mohammed from sudan

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

    Learnt something new, thank you, namesake :)

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

    Welcome back to RUclips! 😍

  • @heinhanekom6755
    @heinhanekom6755 3 года назад +1

    Thnx Mohammed. Wasn't aware of the nuance so this was super helpfull!!! Thnx for taking the time to make this video. Hope to see more. :)

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

      glad you like it :)

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

    It's better practice to watch for changes within the actual Eloquent model insted of the closure function or controller.

  • @LinhPham-iu2fr
    @LinhPham-iu2fr 3 года назад

    Thanks for the video. Could you please let me know what's your theme and color scheme?

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

    Thanks for this. Can you explain more about authentication in Laravel. More on custom guards and provider.

    • @themsaid
      @themsaid  3 года назад +1

      Ok will try to make a video on that :)

  • @muhammadtariq7474
    @muhammadtariq7474 3 года назад +1

    Love your accent 😍

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

    how detect change , two models or more or two table change(update one data,change 2 o 3 tables) with getdirty?

  • @pietrosavastano9940
    @pietrosavastano9940 3 года назад +1

    hi mohamed said great work . i am learning laravel right now i was wondering how did you get so good at it to the point that you even started contributing to open source any piece of advice of some one just starting .
    Btw your making really useful videos

  • @suresh.khadka
    @suresh.khadka 3 года назад

    From Nepal.. ❤️❤️

  • @AngelinCalu
    @AngelinCalu 3 года назад +1

    This is probably the first time I've been able to press like on the same video twice on RUclips.
    Did you just cut 13 seconds off? :D

    • @themsaid
      @themsaid  3 года назад +1

      haha yeah I had a few mistakes that had to be edited out. Still working on my video editing skills :|

    • @AngelinCalu
      @AngelinCalu 3 года назад +3

      Well, just make sure to post more often then :) We are always eager to see your content! 😎

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

    legend

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

      glad you like it

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

    amazing, thanks a lot

    • @themsaid
      @themsaid  3 года назад +1

      You are welcome!