Eloquent RAM Optimize: Load Only What You Need
HTML-код
- Опубликовано: 4 окт 2024
- A simple example of how to use less memory when loading Eloquent data.
My course "Eloquent: Expert Level" bit.ly/eloquent...
New in Laravel 8: withSum/withMax/withAvg on Relationships: • New in Laravel 8: with...
- - - -
Support the channel by checking out our products:
Try our Laravel QuickAdminPanel: bit.ly/quickad...
Enroll in my Laravel courses: laraveldaily.t...
Purchase my Livewire Kit: livewirekit.com
Subscribe to my weekly newsletter: bit.ly/laravel-...
->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.
Oh. Thank you
I agree, I use this approach too. Callback is better for more complex subqueries rather then using it for selects
@@vjorihoxha1115 and it will make the query a lot cleaner.
Thank you❤️❤️❤️. i forgot this.😳🙆
Finally I am your paid customer... Thanks for all tips and ideas.
Thanks for the great video as always
I am Improving my project day by day with your help 🙇♀️
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
Amazing. Thanks
as always - perfect tips !
Awesome, thanks
Interesting! Thx.
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
what tools are used to view models and data?
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
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
I would use Laravel Telescope.
Or Spatie Laravel Ray (not free): ruclips.net/video/n4pMxyAXeqY/видео.html
Awesome 🎉
Thank you. I have a question . Can we compress the video in laravel?
Like we compress images using intervention package
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.
@@LaravelDaily thank you
Media Library supports video files and has built-in FFmpeg drivers. You can take a look at how they do it.
@@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.
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😁
tell this for projects based on version 5.8, *smile sadly*
There there. *pat pat on your shoulder*
Meow :'(
@@nadiasalma7707 meow apaan neng
@@blank6670 :)
How to get inlay hints in VSC for Laravel on Windows? Someone has an idea or knows an extension?
Hi What do you think about the CRUD generator call Infyom
Sir do you have an online course?
My site in laravel, every page equally 18-20 mb, if not custom sql query. How to optimize this ? What I to do ?
can you please make a videos about graphQl with laravel
It's in plans, later in 2021
Hi. how can i buy ur course withough login, pls help. Thanks
Aways nice
which debugger are you using in this video?
what's the theme name?
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
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
Which chrome extension you are using ???
Laravel Debugbar.
Is there something like the dubugbar for APIs in Laravel?
Laravel telescope. Or Spatie Laravel Ray.
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.
Maybe, it's another approach, depending on how many queries you would have for which case, and how many ratings in general.
@@LaravelDaily I have stated reading your replies in your voice 😂😂
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
Follow laravel/laravel and laravel/framework releases.
@@LaravelDaily Thanks champ!
Thanks, could you please tell me which is the browser extension you are using to see models? Is it available on chrome?
It's Laravel Debugbar, a Laravel package.
How do I add laravel debugbar to my project?
github.com/barryvdh/laravel-debugbar
@@LaravelDaily thanks, I'm new to laravel, any suggestions?
What is the use of byRole() ?
Filter records by current role, with help of Eloquent Scope
How to get laravel debug bar
Composer require barryvdh/laravel-debugbar
hello sir