Laravel Pro Tips
#scheduler
π‘ #Laravel Tips of the day π Laravel ππΈπΆπ½ πΊπ²ππ΅πΌπ± πΆπ» ππ°π΅π²π±ππΉπ²πΏ - We can use skip in your commands to skip an execution. #php #backend
vigowebs
#requests #carbon #dates
π₯ If you've ever found yourself manually dealing with request inputs looking to parse it to Carbon. You might want to use the `date` method on the Request instance instead. #Laravel #PHP
Morten Poul Jensen
#eloquent #relationships
Laravel Tip π‘ v9.16 introduces a new withWhereHas() to reduce code duplication π Time to do a bit of cleaning π§Ή
Philo Hermans
#arrays
#Laravel Tip π₯ : You can set the prefix in array keys with newly released method prependKeysWith() in Laravel 9.14.0 Let's checkout an example π: #PHP #webdevelopers #100DaysOfCode #developers
Mohammad Haris β‘
#eloquent
π‘π° Quick #Laravel Eloquent tip for comparing database columns to each other within a query. You don't have to use any raw statements to do this - whereColumn() has got you covered! π
Lupinity Labs | Freelance Software Dev
#carbon #dates
π₯ #Laravel Tip: If you need to render dates and times a lot in your app, then consider making a custom Carbon class. You can then tell Laravel to always use your class via the Date facade.
Matt Kingshott
Shoutout to my favorite array helper in Laravel π Arr::random returns one or multiple random values from an array. Unlike the native array_rand which return a random key.
Daniel Eckermann
#models #events
π₯ #Laravel Tip: At scale, calculating metrics for dashboards can take a long time, as you might have to count thousands or even millions of records. Fortunately, you can easily fix this by using model events to maintain stats. Hereβs a simple example:
#cheatsheet #lang
πA #Laravel Lang (Translation) #Cheatsheet #PHP
Aaron Lumsden π | Indie Hacker Dev