
Laravel Daily @DailyLaravel
#Laravel tip of the day: you can do *recursive* Laravel relationships in Eloquent, see screenshot and read more in this article: https://t.co/4UgBf52WLQ https://t.co/aWMapCIwWg
Laravel Daily @DailyLaravel
#Laravel tip of the day: you can do *recursive* Laravel relationships in Eloquent, see screenshot and read more in this article: https://t.co/4UgBf52WLQ https://t.co/aWMapCIwWg
Laravel Daily @DailyLaravel
#Laravel tip of the day: Laravel Collection has nice firstWhere() method to make your code a little shorter. See example in the screenshot and the docs: https://t.co/vpKM0BMZCt https://t.co/K4sdYsg9zA
Dries Vints @driesvints
🔥 When working with logic to determine exception throwing, consider extracting it to a separate method. This allows for less cognitive overload inside the method you're scanning through and for re-usability. 💡 More dev tips: https://t.co/LhsCAz563J #PHP #DevTips https://t.co/Y7zowSh6Xl
0.5x developer @n0x13
@driesvints The pattern is often called the Guard Pattern and most of the time it's common to call the method "guardAgainst..." so for example: https://t.co/34mMVzIIxC
Brent @brendt_gd
Did you know you may also pass `null` as a function typed parameter value in #PHP, even though the type is not marked nullable with `?` All parameters with a default value of `null` may receive `null` as a value. https://t.co/mdbqXprZag
Jeff Ochoa @Jeffer_8a
??? #TIL You can use the "--testdox" flag in PHPUnit to get a list of the methods (test) in the CLI output https://t.co/WGc9JDZauy @laravelphp #PHP #PHPUnit https://t.co/QQjV7bHRh6
Morten Bergset @mortenbergset
Multi inserts in db with PHP #phptip https://t.co/JN3OttCN5u
Wilbur Powery E. @wilburpowery
Do yourself a favor and work to make your code more readable. Even simple conditional checks could take a few seconds to understand 6 months from now ? #php #laravel #clean #code https://t.co/yxrqvs1wgV
Paul Redmond ?? @paulredmond
? If you're application is behind a proxy/load balancer, you can force HTTPS at the web server level by checking the X-Forwarded-Proto header https://t.co/oomJNOWNUe
Sebastian De Deyne @sebdedeyne
Don't be afraid to be explicit with config / embed values. Your colleagues and future self will thank you. https://t.co/0cc03AGdzA
Raul @rcubitto
Remind that you can dump your test response, if you need to take a quick glance at its content. #Laravel https://t.co/r2euoqlSzl
Jacob Bennett @JacobBennett
Ever want to reset a piece of your Vue component state back to it's initial values? Using this until someone tells me otherwise! https://t.co/HUapG5pA9u
Andrew Schmelyun @aschmelyun
If you're using #php and want to find the closest date to today in an array of dates, check out this quick snippet! https://t.co/b7zUWyzaY6
Vladinator @kalessil
For those who like me din't know about this PhpUnit feature: you can run failed tests first ? - https://t.co/6cABml1jp5
Stefan Bauer @stefanbauerme
? Here's a quick tip for more expressive dataProvider in #PHPUnit! Just use the provider array key as an expressive title! https://t.co/eZwst3LeWN
Pine @thepinecode
Did you know? You can replace multiple characters in a string, by passing an array to the str_replace() function. Handy! ? #PHP https://t.co/d4fNqqpVxa
Jason McCreary @gonedark
? Pushing yourself to remove comments is one of the best drivers towards clean code. Here's a few tips on how to spot and replace comments that may be unnecessary… https://t.co/STIK6AIKXt
Alexander Lichter @TheAlexLichter
Looking for an easy way to retrieve duplicate values (and duplicate count) from an Array in #php? No problem with #laravel #collections and a bit of #declarative programming https://t.co/fxJMRSVfGT
Erik D. Kennedy @erikdkennedy
UI protip 002: In general, round shapes (letterforms, icons, boxes, etc) are more friendly, and squared shapes are more official. https://t.co/eQ4O1hJQvy
Mohamed Said? @themsaid
I wish I had known this was possible earlier in my career. Time travelling using Carbon. https://t.co/hLMg5EAD6B