Eloquent: Two HUGE Performance Mistakes

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

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

  • @r.chitector
    @r.chitector 2 месяца назад +2

    "Mistakes" videos are the best!!! :) (because of new deep knowledge)

  • @rafamorawiec
    @rafamorawiec 2 месяца назад +7

    I agree. Few years ago I fall in love with $with and that was a huge mistake. Now I'm never using $with and it's even better for me and my co-workers because now by just looking at query we know what exactly it will return.

  • @vaultdweller966
    @vaultdweller966 2 месяца назад +4

    You didn't mention it but when you have a "$with" property on your model, you can use ->without('xxxxx') when you specifically don't need the relationship in a particular query.

  • @elgoogssie3969
    @elgoogssie3969 2 месяца назад +5

    I'm sufferning form the imposter syndrom, but when i watch Your videos i actually feel good about myself since i do not make such cardinal mistakes as mentioned in this video. I do not consider myself as a programmes thou. I only work as one :)

  • @PepperAddict
    @PepperAddict 2 месяца назад +2

    ->random() or might be called ->inRandomOrder() is also very slow

  • @tomasreinert5511
    @tomasreinert5511 2 месяца назад +1

    This is great video!

  • @philipjamesajagabos2519
    @philipjamesajagabos2519 2 месяца назад +1

    Very helpful video

  • @ryiad2010
    @ryiad2010 2 месяца назад +1

    it is very helpful thanks

  • @rafa-m5s2l
    @rafa-m5s2l Месяц назад

    Hi Povilas! Are you sure the cause lies in $with? I tried to reproduce this error and when using $with I get 2 queries. Could the cause lie deeper, for example in $append and some attribute that uses organisation?

    • @LaravelDaily
      @LaravelDaily  Месяц назад

      Not sure now, it's been a while since this video, don't remember its details now

  • @ultrono23
    @ultrono23 2 месяца назад +1

    Great video.

  • @r.rakeshreddy1651
    @r.rakeshreddy1651 2 месяца назад +1

    Great video

  • @GeeksPartnerM
    @GeeksPartnerM 2 месяца назад

    Does Model::with have the same effect? Should we avoid using those relationships??

    • @LaravelDaily
      @LaravelDaily  2 месяца назад

      No, it's just about defining $with globally.

  • @nirbhaysingh2504
    @nirbhaysingh2504 2 месяца назад

    How can I contact u I want to ask a few questions

    • @LaravelDaily
      @LaravelDaily  2 месяца назад

      povilas@laraveldaily.com but I don't have much free time, only quick questions please

  • @PedroS-nv1sl
    @PedroS-nv1sl 26 дней назад

    IU won't name them, but their code has Webkul written all over it 😅

  • @vodacbao
    @vodacbao 2 месяца назад

  • @rvrelaxingmusic4602
    @rvrelaxingmusic4602 2 месяца назад +2

    What about $appends, is it the same case as $with or has another benefit?

    • @LaravelDaily
      @LaravelDaily  2 месяца назад +3

      It's different, it automatically loads only for APIs, as I remember. But I don't remember using it ever, for the same reason: no guarantee when it would work

  • @operationblackbishop4785
    @operationblackbishop4785 2 месяца назад +1

    Lol, I know the CRM.

    • @weeb3277
      @weeb3277 2 месяца назад

      go on

    • @operationblackbishop4785
      @operationblackbishop4785 2 месяца назад

      @@weeb3277 just look for Laravel Open Source CRM it will be in first 3 results. Check the demo.