Eloquent RAM Optimize: Load Only What You Need

แชร์
ฝัง
  • เผยแพร่เมื่อ 29 ม.ค. 2025

ความคิดเห็น • 61

  • @3dxspx703
    @3dxspx703 3 ปีที่แล้ว +32

    ->with('relationship:id,field1,field2')
    I think this is better than the callback in terms of selecting fields. Just be sure to include id field as the first field.

    • @J2TeamNNL
      @J2TeamNNL 3 ปีที่แล้ว

      Oh. Thank you

    • @vjorihoxha1115
      @vjorihoxha1115 3 ปีที่แล้ว +1

      I agree, I use this approach too. Callback is better for more complex subqueries rather then using it for selects

    • @3dxspx703
      @3dxspx703 3 ปีที่แล้ว

      @@vjorihoxha1115 and it will make the query a lot cleaner.

    • @Framelo-n4d
      @Framelo-n4d ปีที่แล้ว

      Thank you❤️❤️❤️. i forgot this.😳🙆

  • @Viveksharmaa
    @Viveksharmaa 3 ปีที่แล้ว +8

    Finally I am your paid customer... Thanks for all tips and ideas.

  • @hemantbhardwaj17
    @hemantbhardwaj17 3 ปีที่แล้ว +5

    Thanks for the great video as always
    I am Improving my project day by day with your help 🙇‍♀️

  • @poplach
    @poplach 3 ปีที่แล้ว

    Thanks for your work! Would be nice to see some advanced videos on jobs. This is very tricky part and I believe many people would like to know what Laravel Jobs are capable of. Cheers

  • @pfkcskafan
    @pfkcskafan 2 ปีที่แล้ว

    what tools are used to view models and data?

  • @bestsolution794
    @bestsolution794 3 ปีที่แล้ว +2

    Thank you. I have a question . Can we compress the video in laravel?
    Like we compress images using intervention package

    • @LaravelDaily
      @LaravelDaily  3 ปีที่แล้ว +1

      I haven't seen any Laravel package that works with video. And, to be honest, it's such a heavy CPU/GPU operation, that I wouldn't expect Laravel/PHP to do it, there are probably other languages/technologies for that.

    • @bestsolution794
      @bestsolution794 3 ปีที่แล้ว

      @@LaravelDaily thank you

    • @mabdullahsari
      @mabdullahsari 3 ปีที่แล้ว +2

      Media Library supports video files and has built-in FFmpeg drivers. You can take a look at how they do it.

    • @LaravelDaily
      @LaravelDaily  3 ปีที่แล้ว

      @@mabdullahsari Wow didn't know that. But anyway, I would not process video compression on the same server, it may slow down the whole web for you. Unless you may configure it to be done on a separate server in Media Library.

    • @Stoney_Eagle
      @Stoney_Eagle 3 ปีที่แล้ว

      If you have shell_exec rights on the server you can use ffmpeg and set a lower crf or bit rate 😉
      Im working on a package that does this but I create them for both php laravel and nodejs express so development is slow😁

  • @eleazarfederio1718
    @eleazarfederio1718 3 ปีที่แล้ว

    Sir do you have an online course?

  • @arielperez3284
    @arielperez3284 3 ปีที่แล้ว

    Amazing. Thanks

  • @notforever123
    @notforever123 3 ปีที่แล้ว

    Awesome, thanks

  • @alzy101
    @alzy101 3 ปีที่แล้ว +1

    Is there a similar tool to the one you're using for analyzing a debugging API queries? I am building my backend with Laravel and my frontend with Nuxt so I use mostly API requests as opposed to using views

    • @LaravelDaily
      @LaravelDaily  3 ปีที่แล้ว +2

      I would use Laravel Telescope.
      Or Spatie Laravel Ray (not free): th-cam.com/video/n4pMxyAXeqY/w-d-xo.html

  • @collinrobinson1294
    @collinrobinson1294 3 ปีที่แล้ว

    Hi What do you think about the CRUD generator call Infyom

  • @aspirinemaga
    @aspirinemaga 3 ปีที่แล้ว

    as always - perfect tips !

  • @UsmanAli-yv6vo
    @UsmanAli-yv6vo 3 ปีที่แล้ว

    which debugger are you using in this video?

  • @dariusdxd
    @dariusdxd 3 ปีที่แล้ว

    Thank you for your video. Just one question about reviews ratings. Is it good adea to add extra two fields in product table "number of reviews" and "rating average", and then recalculate these values everytime users adding new reviews. So should be easy to sort products by ratings or number of reviews.

    • @LaravelDaily
      @LaravelDaily  3 ปีที่แล้ว +3

      Maybe, it's another approach, depending on how many queries you would have for which case, and how many ratings in general.

    • @_saurabhshah
      @_saurabhshah 3 ปีที่แล้ว +2

      @@LaravelDaily I have stated reading your replies in your voice 😂😂

  • @AbdoElzahaby
    @AbdoElzahaby 3 ปีที่แล้ว

    can you please make a videos about graphQl with laravel

    • @LaravelDaily
      @LaravelDaily  3 ปีที่แล้ว

      It's in plans, later in 2021

  • @mohammadfauzi6167
    @mohammadfauzi6167 3 ปีที่แล้ว

    Nice video sir, can i request something? I want learn about auth multi lvl and and user roles in laravel 7, i hope u can make thats video, thanks

    • @PovilasKorop
      @PovilasKorop 3 ปีที่แล้ว

      I have a separate course laraveldaily.teachable.com/p/practical-roles-and-permissions-in-laravel
      But also search on this channel, I've published at least a few videos on roles

  • @GergelyCsermely
    @GergelyCsermely 3 ปีที่แล้ว

    Interesting! Thx.

  • @mandeep_mehra
    @mandeep_mehra 3 ปีที่แล้ว

    Which chrome extension you are using ???

  • @bhaidar
    @bhaidar 3 ปีที่แล้ว

    Hey Povilas, great job as usual! I have a question for you. Where can I follow the latest releases of Laravel, and know what's being added in every major/minor release? I checked the laravel github for 8.12 and I only found 8.5.12 and no eloquent changes in there. Thanks

    • @LaravelDaily
      @LaravelDaily  3 ปีที่แล้ว +1

      Follow laravel/laravel and laravel/framework releases.

    • @bhaidar
      @bhaidar 3 ปีที่แล้ว

      @@LaravelDaily Thanks champ!

  • @developerahtnezev507
    @developerahtnezev507 2 ปีที่แล้ว

    what's the theme name?

  • @khaledwaleed6395
    @khaledwaleed6395 3 ปีที่แล้ว

    Nice one but I have a problem I haven't done any query and it's using 17 megabytes of memory already I removed all the CSS, js, and images and it's still using the same amount of megabytes

  • @alinlinca6361
    @alinlinca6361 10 หลายเดือนก่อน

    How to get inlay hints in VSC for Laravel on Windows? Someone has an idea or knows an extension?

  • @marcomastella6508
    @marcomastella6508 3 ปีที่แล้ว

    Thanks, could you please tell me which is the browser extension you are using to see models? Is it available on chrome?

    • @LaravelDaily
      @LaravelDaily  3 ปีที่แล้ว +1

      It's Laravel Debugbar, a Laravel package.

  • @notrealsaga
    @notrealsaga 3 ปีที่แล้ว

    Is there something like the dubugbar for APIs in Laravel?

    • @LaravelDaily
      @LaravelDaily  3 ปีที่แล้ว +1

      Laravel telescope. Or Spatie Laravel Ray.

  • @asimal-tayeb5355
    @asimal-tayeb5355 3 ปีที่แล้ว

    Awesome 🎉

  • @ualikhandulat
    @ualikhandulat 3 ปีที่แล้ว

    My site in laravel, every page equally 18-20 mb, if not custom sql query. How to optimize this ? What I to do ?

  • @piyushgupta9125
    @piyushgupta9125 3 ปีที่แล้ว

    What is the use of byRole() ?

    • @PovilasKorop
      @PovilasKorop 3 ปีที่แล้ว +1

      Filter records by current role, with help of Eloquent Scope

  • @khanh7817
    @khanh7817 2 ปีที่แล้ว

    Hi. how can i buy ur course withough login, pls help. Thanks

  • @trance_hardstyle
    @trance_hardstyle 3 ปีที่แล้ว +1

    Tell me pls, if i wanna to display the text from input , i write $name = $request->input('name');
    but for share to all views , using, appserviceproviders, this $name does not working! why? Or it's impossible to use this method, or i am doing smth incorrect ..
    View::share('data1', $name); // does not work

  • @heyyy4987
    @heyyy4987 3 ปีที่แล้ว

    Aways nice

  • @aogunnaike
    @aogunnaike 3 ปีที่แล้ว

    How do I add laravel debugbar to my project?

    • @LaravelDaily
      @LaravelDaily  3 ปีที่แล้ว

      github.com/barryvdh/laravel-debugbar

    • @aogunnaike
      @aogunnaike 3 ปีที่แล้ว

      @@LaravelDaily thanks, I'm new to laravel, any suggestions?

  • @sealsage
    @sealsage 3 ปีที่แล้ว

    How to get laravel debug bar

    • @LaravelDaily
      @LaravelDaily  3 ปีที่แล้ว

      Composer require barryvdh/laravel-debugbar

  • @vovkko
    @vovkko 3 ปีที่แล้ว +6

    tell this for projects based on version 5.8, *smile sadly*

    • @LaravelDaily
      @LaravelDaily  3 ปีที่แล้ว +8

      There there. *pat pat on your shoulder*

    • @nadiasalma7707
      @nadiasalma7707 3 ปีที่แล้ว

      Meow :'(

    • @blank6670
      @blank6670 3 ปีที่แล้ว

      @@nadiasalma7707 meow apaan neng

    • @nadiasalma7707
      @nadiasalma7707 3 ปีที่แล้ว

      @@blank6670 :)

  • @chitamars669
    @chitamars669 3 ปีที่แล้ว

    hello sir