18 Laravel/PHP Tips in 10 Minutes: June 2024

Sdílet
Vložit
  • čas přidán 30. 06. 2024
  • A new monthly tradition: a re-cap of Twitter about Laravel/PHP over the last month.
    Links mentioned in the video:
    - [My course] PHP for Laravel Developers laraveldaily.com/course/php-l...
    - [Video] NEW in Laravel 10.33: Number Formatting Class • NEW in Laravel 10.33: ...
    - [Video] Laravel Job Batch: Show Queue Progress • Laravel Job Batch: Sho...
    - [Tweet] Martin Joo on Service Classes x.com/mmartin_joo/status/1799...
    - [Tweet] "I'm switching from Laravel to Rails": Reddit Thread x.com/PovilasKorop/status/180...
    - [List] Laravel People to follow on Twitter laraveldaily.com/people-to-fo...
    - - - - -
    Support the channel by checking out my products:
    - My Laravel courses: laraveldaily.com/courses
    - Filament examples: filamentexamples.com
    - Livewire Kit Components: livewirekit.com
    - - - - -
    Other places to follow:
    - My weekly Laravel newsletter: us11.campaign-archive.com/hom...
    - My personal Twitter: / povilaskorop
  • Jak na to + styl

Komentáře • 25

  • @PabloZagni
    @PabloZagni Před 9 dny +4

    Yes! Please continue with monthly tips!

  • @mhm2314
    @mhm2314 Před 8 dny +3

    Very good and efficient tips.
    Please continue this.

  • @dsuess
    @dsuess Před 7 dny +1

    Thanks for re-posting passing variables to a View
    Tip: "Don't use Rails"

  • @user-if1ps7oo4b
    @user-if1ps7oo4b Před 6 dny +1

    i love this tips make me learn new things, most likely i will forget them again but i know where to come when need remember something

  • @MichalKuzmicki
    @MichalKuzmicki Před 9 dny +2

    The "tell, don't ask" example is more about two things: declarative programming; and a bit about separating the domain of the code - instead of creating some extended logic in the code, that is not the domain of the lessons (let's say a code for singing in, more about the participant, than the lesson itself), I prefer to create logic of the lesson in the lesson class/domain, and allow other domains to have minimal contact with this logic. Thanks to that when debugging such a code - you won't be surprised by an "alien" code.

  • @dsuess
    @dsuess Před 7 dny +1

    This is a DARN GOOD tradition, thank you!

  • @franciscomagalhaes7457

    This is helpful, thank you.

  • @piyushgupta2128
    @piyushgupta2128 Před 8 dny +1

    Great work sir 👍, please continue

  • @wgblondel
    @wgblondel Před 9 dny

    Thanks for the tips!

  • @TalesGrechi
    @TalesGrechi Před 9 dny

    These were great tips!

  • @DoonSafari
    @DoonSafari Před 9 dny +1

    Yes Please. You are doing great work man❤

  • @_plamp_
    @_plamp_ Před 9 dny

    Awesome these are nice to know

  • @saravanasai2391
    @saravanasai2391 Před 9 dny

    Wow, that is a great share. Hi chief, I would suggest you make a video related to event-sourcing in Laravel. What are the real-world use cases? A simple explanation that everyone can understand.

    • @LaravelDaily
      @LaravelDaily  Před 9 dny

      I haven't used it myself, so can't explain to others :)

  • @rainfog_mzb
    @rainfog_mzb Před 9 dny +1

    1:32 Before using to_route(), I usually confuse (how to redirect with route) without looking documentation

  • @JamesAutoDude
    @JamesAutoDude Před 9 dny

    Another thing is making utilities instead of helpers. Game changer 😮

  • @holacuba2001
    @holacuba2001 Před 9 dny

    Hello Povilas, would have a tip for a redirect with string data?
    Within a method I sometimes must redirect to another route, with a string value as parameter.
    The documentation says do this:
    return redirect()->route('profile', ['id' => 1]);
    and it works perfectly. Except that my parameter is a string and the URL looks ulgly because the paramater gets passed as a GET.
    Is there a fix for that?

    • @LaravelDaily
      @LaravelDaily  Před 9 dny

      Not sure, maybe you defined the route the wrong way? I haven't encountered this issue.

    • @holacuba2001
      @holacuba2001 Před 9 dny

      @@LaravelDaily Please try the eample from the book, but with a string parameter (a sentence). As I said, evrything works fine but the URL is ugly.

    • @LaravelDaily
      @LaravelDaily  Před 8 dny

      Sorry, I don't have time to try, could you post the code of your profile route from the routes file?

  • @digitzero3613
    @digitzero3613 Před 9 dny

    What's the point of disabling lazy loading? I though Laravel guys recommend it.

    • @LaravelDaily
      @LaravelDaily  Před 9 dny +2

      Enforcing EAGER loading, to avoid N+1 query problem.

    • @digitzero3613
      @digitzero3613 Před 9 dny +4

      @@LaravelDaily Ohh excuse me, I am so bad with these terms. I was actually thinking about eager loading but didn't realize that lazy loading is different. Thank you!