Laravel's New Strict Mode (Everything You Need to Know)

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

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

  • @KasimSheyi
    @KasimSheyi Год назад +30

    The way Jefferey explains things, the clarity is awesome🎉🎉🎉

  • @christostsangaris4785
    @christostsangaris4785 Год назад +4

    Like a boss!! This feature should be enabled by default!

  •  Год назад +1

    What editor is that?

  • @faisalhakim5920
    @faisalhakim5920 Год назад +1

    8:20 i think you need to clarify this wording, because "responsible" dev should always include fillable, right?
    i know what you mean is if you can be responsible in developing without fillable, than you can remove that. But I am afraid that someone might miss interpreted it to be recomendation

  • @alnahian2003
    @alnahian2003 Год назад +3

    10:51 yeah that's when the magic happened 💫

  • @wiwidwidyanto3203
    @wiwidwidyanto3203 Год назад +3

    Can you tell me, how you setup your IDE

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

    weird, without any strict mode, when you create a model, it store the fillable fields only, even you provide many fields in the create(),
    i can't trigger your first error

  • @JavedURRehman
    @JavedURRehman Год назад +3

    Very clear explanation of Laravel Strict Mode. Thanks Jeffrey

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

    I have watched hundreds of tutorials from you but never saw your face. Why does it always feel weird when that happens 😂

  • @devaes
    @devaes Год назад +2

    is it really ok to unguard? imagine the time we save for protected $fillable 🤣

    • @Laracastsofficial
      @Laracastsofficial  Год назад +5

      As long as you don't blindly pass request()->all() to Eloquent, you should be perfectly fine.

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

      @@Laracastsofficial finally I just got an answer of a question which has been spinning in my head for weeks!
      Thank you, Jeffrey Way!

  • @abrahamghaemi8895
    @abrahamghaemi8895 Год назад +2

    Good points.
    Maybe need to create a new course for Laravel tips and tricks.

  • @sirajul-anik
    @sirajul-anik Год назад +1

    It's good to hear Jeffrey's voice after so many years. I started working with Laravel back in 2014 and his tutorials really helped me to understand everything. Thanks for those days.

  • @adegunolumurewa9820
    @adegunolumurewa9820 Год назад +1

    So much information into 11 minutes 18 seconds and it didn't in anyway feel overwhelming. Great work

  • @SergejTihonov
    @SergejTihonov Год назад +2

    I'm so glad that you made this video ❤
    I overlooked this option so far and was missing it. This makes my developer life so much easier. Thanks a lot!

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

    My strict mode is to not use PHP like some sort of peasant.

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

    This should be a boolean toggle in the .env.

  • @Unforgiveness
    @Unforgiveness Год назад +1

    great vidoe. time to upgrade my laravel

  • @phojie6868
    @phojie6868 Год назад +1

    the ICONIC voice of LARAVEL!!

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

    Long time no see you brother.

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

    i want to know what is your editor?

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

    Wow this is so cool

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

    Thank you!

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

    Wow, Just WOWWWWW

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

    I think in real use-case, nobody writes laravel code like this. They hardly use blade engine and database queries are usually written not using eloquent. I would even say that for new projects its best to NOT do such proprietary laravel things so that other developers can also work without stress who aren't laravel experts. Sure does look pretty though.

    • @Laracastsofficial
      @Laracastsofficial  Год назад +2

      You think developers aren't using Blade and writing database queries with Eloquent?? That's very much untrue.

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

      Oh yeah, I have seen my fair share of Laravel applications which came to me from some feature addition or upgradation written completely using vanilla php styled views and using raw SQL queries. I outrightly reject the offer of that work.

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

    First of all, the alias trick got me... never thought about creating such an alias... Good stuff

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

    Awesome!!! dude, even when english is not my native language I can understand your explatanation very well. U rock!

  • @ivan.silicin
    @ivan.silicin Год назад +1

    Супер, дякую!

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

    Nice vid :). what's the configuration of your phpstorm? how can u see open files in a central drop down menu? it looks very nice

  • @graham11545
    @graham11545 Год назад +1

    Awesome 👏🏾

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

    🤯 preventLazyLoad is just amazing.

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

    Awesome information! I need to start using this. Good to know what this does and how it works. Thank you!

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

    You made my weekend more awesome. Thanks..😇

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

    Love the intro !! Not ridiculous at all ^^'

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

    `Model::unguard()` is a bad idea.

    • @Laracastsofficial
      @Laracastsofficial  Год назад +1

      It's an incredibly common practice. You gotta back up strong statements like that with reasoning.

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

    When u use inertia few off them never going to happen

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

    NOICE!

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

    Awesome thanks

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

    Awesome.

  •  Год назад

    what is your diet? wow

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

    Nice

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

    Laravel is beautiful

  • @АйбатАманбайұлы

    Wow!!!

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

    Intro😂😍🤣

  • @mohammadashrafuddinferdous9347

    It's amazing!

  • @mahmoud-bakheet
    @mahmoud-bakheet Год назад

    should be strict 😂

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

    WOW ... 👏👏👏

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

    Amazing

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

    Great video!

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

    omg very cool, but i think unguard is very dangers

    • @jeffreyway520
      @jeffreyway520 Год назад +1

      It’s no more dangerous than a sharp knife.

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

      @@jeffreyway520 I get what you are saying but there is a reason why you need a sharp knife, there is no need for unguarded. But I prefer explicitness in my code. I even type everything and turn on explicit types.

  • @Bykv78
    @Bykv78 Год назад +1

    Lovely tips! Thank you! I tried to enable preventAccessingMissingAttributes, but it is throwing an exception when I try to access count of a relationship. Let's say I have $posts = Post::withCount('comments')->get(); and inside the blade, I try to access it like $post->comments_count. Right there, it throws the exception. Any thoughts?

  • @tiagotheoliveira
    @tiagotheoliveira Год назад +1

    Very nice and useful !