Regarding the "complex queries in controllers": why would you make a separate class for a single query as opposed to adding a method to the relevant model?
@LaravelDaily13 сағат бұрын
Good question. Maybe because Model is too big already?
@umarbabajidda966410 сағат бұрын
Also, I guess if you are going to have plenty of those instances then it'd make sense - just to keep everything tidier. As in the example, some applications might have a lot of reports/statistics that might need long, complicated queries just to get the total amount or count or something similar
@iconicae8814Күн бұрын
I have a table in my db has expires_at filed how do I make the system delete the record that has expired I tried observer and command schedule and it didn't work and caused a bug I am using laravel 11
@NorthernWinterКүн бұрын
use the prunable trait, configure the method to check the expires_at column and add model:prune command to your scheduler at whatever interval you want
@iconicae8814Күн бұрын
@@NorthernWinter Thanks man , that helps !
@aruproy298315 сағат бұрын
where and how to start my laravell journey
@LaravelDaily13 сағат бұрын
I have a roadmap for Laravel: laraveldaily.com/roadmap-learning-path