Laravel Pro Tips
🔥 #Laravel Tip: Macros provide a way to add missing functionality to many parts of the framework, such as the query builder. These macros can be "user-facing", but they don't have to be. Sometimes they can be used just to make your tests simpler (or to aid in debugging).
🌶️ #Laravel Tip: Prefer Eloquent over Query Builder when performing updates, inserts, etc.
When using Query Builder to update a record in DB, $fillable, $guarded, & the rest of Eloquent goodies are ignored.
#Laravel #PHP #development
Bilal Haidar - Available 4 Laravel gigs
🔥 #Laravel Eloquent Tip - You can use "as" in Eloquent Query Builder to return any column with a new name, exactly like in a regular SQL query.
Marian Pop 🇺🇦 Laravel Magazine
🔥 #Laravel Tip: Make use of the ‘value’ method on the query builder to execute a more efficient query when you only need to retrieve a single column.
No articles were found.