Laravel Pro Tips
#blade #directives #html
⚡️ Did you know that Laravel now has first-party directives for conditionally outputting disabled, checked and selected attributes on HTML elements? Much nicer than if directives or ternaries.
Ryan Chandler
#directives #environments #env
#Laravel Tip 🔥 You may use "env" directive to check the running environment of the application You can also specify the array in "env" directive to check the multiple environments.
Gurmandeep Singh
#directives #environments
#Laravel Tip 🔥: production & env directives are very handy to execute the conditional code based on your server type. #PHP #webdevelopers #100DaysOfCode #developers
Mohammad Haris ⚡
#blade #directives
🔥 Quick #Laravel Tip - If you find yourself repeating code logic throughout your blade templates, you can wrap that into a custom blade template using 𝗕𝗹𝗮𝗱𝗲:: facade inside a service providers 𝚋𝚘𝚘𝚝() method
Marian Pop 🇺🇦 Laravel Magazine
🔥 #Laravel Tip: Version 9 of the framework includes the new @checked and @selected directives for use in Blade templates. They are a nice addition that makes it easier to define whether a checkbox is checked, or which value a dropdown should be set to.
Matt Kingshott
As of Laravel 9, we can use the new "pushOnce" directive in our Blade views 🚀 #laravel #php
Ash Allen 🚀
🔥 In Laravel 9, you'll be able to use the cool new "checked" Blade directive. This is going to be a nice addition that we can use to clean up our Blade views a little bit #laravel #php
Been using a custom @.attribute directive to clean up my Blade components this past week 😏 No more ugly string concatenation for attributes, escaping special characters, or inline @.if statements 🥴 After the success of @.class, would you like to see this in the Blade core? 🤓
Dan Harrin 🦒
#blade #directives #forEach #else
The Blade foreach directive can help cleanup loops in your templates. #Laravel
Kirschbaum Development
May 3rd, 2022
#directives #http #datetime #factories #booleans
20 Useful Laravel Tips
Read 20 useful tips that you can use in your Laravel projects. These tips have been built using my best-performing tweets on Twitter and cover databases, standards, testing, Artisan commands, and much more.