
Alex Garrett-Smith @alexjgarrett
TIL about the Eloquent reorder() method, which clears previously set orderBy clauses 🙌 https://t.co/ptl4EmCfSV
Alex Garrett-Smith @alexjgarrett
TIL about the Eloquent reorder() method, which clears previously set orderBy clauses 🙌 https://t.co/ptl4EmCfSV
Bruno Falcão 🚀 @brunocfalcao
🔥Laravel tip If you want to save an Eloquent model without triggering Eloquent Events use the method saveQuietly() $yourModel->saveQuietly() Lifesaver on model observers when you don't want to recursively trigger its own events (ending in an infinite loop)
Enlightn @Enlightn_app
🚀 Laravel Performance Tip: To avoid memory leaks in queue workers, it's often a good practice to restart your workers at regular intervals. This is from @themsaid's blog. Original post: https://t.co/81gijq6PLT https://t.co/LasZo7eAIM
Jason Beggs @jasonlbeggs
🔥 Don't forget when Route Model Binding in @laravelphp, you can customize the column Laravel uses to find the model in your route definition now! It's the little details that make Laravel so awesome. https://t.co/qvb63xobj5
Felix Schmid @schmidfelix13
It's about the small things that make developing with Laravel such a nice experience! I haven't thought that that validation would work.. https://t.co/EqPwAXXKaA
The Laravel Dev @TheLaravelDev
While adding a New Column to existing table using Migration, the column is always added at the last. ✅You can use the after() to place the New Column after a specific column. ✅You can also use the first() to place the New Column at the start of the table. #Laravel https://t.co/hNaiFuYZi5
Laravel Daily @DailyLaravel
Laravel tip of the day: if you want to ensure that your Route parameter is a number, you can add a regex rule directly in the routes/web.php https://t.co/FZFZumKzdx
Alex Garrett-Smith @alexjgarrett
👀 Did you know you can pass an optional column to the Eloquent builder latest() method? https://t.co/xvb93iIlc2
Povilas Korop @PovilasKorop
Quick Laravel tip: if you want to have a custom validation rule but it's a short one-liner, you may specify it directly in the $rules array, as a callback function. https://t.co/su7vUvZTM4
Sam Carré 🤠 @carre_sam
✨ Eloquent Tip You can use the "wasChanged()" method to check if a specific attribute was just changed. ✅ https://t.co/4hEUuSVNaq
Liam Hammett @LiamHammett
🔥 You don't need a closing tag when using the @php directive in @laravelphp Blade, you can put some logic on a single line. It's especially nice to use it to do things like setting default values in a partial with the null-coalesce-assign operator. https://t.co/raQZBfPyxm
Boris Lepikhin @lepikhinb
@reinink @inertiajs @LaraconOnline I love how easy it is to preserve request params even after page reloading. Though it can also be done with a Controller, this way looks more re-usable for me. @inertiajs https://t.co/UxNJ7hbVoB
Lasse @LasseRafn
💡 in Laravel you can do things as the framework is terminating (after request has been processed!) You can do this in a middleware, using App::terminating with callback or natively with PHP using register_shutdown_function https://t.co/Z6tzN8jdkd
Liam Hammett @LiamHammett
🔥 With Laravel Mix, if you're building Sass files, you can pass a list of PostCSS plugins as the fourth parameter that will only apply to the given file. This is useful if you want one process to handle multiple things as usually the postCss method will apply to all CSS files https://t.co/B67M4kWOX4
filip.pacurar 😎 @filipacro
Pro tip for #Laravel @laravelphp developers that use the Ide Helper. Just came with this idea today: listen for MigrationsEnded event and then call ide-helper:models command to generate the helper file automatically after any migrations. #php #ProTip https://t.co/ggwE60m1Q7
Jason McCreary @gonedark
Piggybacking off the last 🔥 tip, most Blade templates simply use the `if` directive. However, there are so many more Blade directives available. These are not only more expressive, but often streamline the code. Here's a side-by-side comparison: https://t.co/Z2Edmf8kDO
James Brooks @jbrooksuk
Did you know that you can use the DB facade to create a Partition Metric in Laravel Nova to breakdown email domains? #ProTip https://t.co/eTCoadCWFW
Laravel Daily @DailyLaravel
#Laravel tip of the day: how to calculate the sum of ALL records, if you only have a PAGINATED collection? You calculate sum BEFORE the pagination, but from the same query. https://t.co/lpPps70Vqs
Francisco Daniel @francisc0daniel
When registering routes, you may limit the possible values for a route parameter. In this way you may change your response based on a valid parameter, having an expressive route and not a Query string parameter. @laravelphp @laravelnews https://t.co/3e1AzXVKCu
Jeff Ochoa @Jeffer_8a
💡 on @laravelphp @LaravelLivewire you can fire global events from the Component class to communicate between other livewire components, or event, @Alpine_JS components: https://t.co/sXlAInB0ct