Laravel Pro Tips
#responses #cheatsheet
β‘οΈA Laravel Response #cheatsheet π₯π₯ Some of the available methods on Laravel's response helper. π€ #laravel #php
Aaron Lumsden π | Indie Hacker Dev
#eloquent #models #relationships
πΆοΈ #Laravel Tip: The Eloquent push() method allows you to save the Model and all of its relations in one shot. Compared to the save() that only saves the Model itself. Here's a practical example to illustrate π₯ https://t.co/N6q2wyDrya #PHP #Laravel
Bilal Haidar - Available 4 Laravel gigs
#cheatsheet #config
π A #laravel Config #CheatSheet π The great thing about Laravel is the documentation is in the method names. π€
#migrations
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 #PHP
Aftab Khan π
#models #factories
π₯ Laravel Tip: Factory states You can create factory states in your model factories to hide the details about the model attributes and make your tests more readable.
Cosme Escobedo
#joins #collections
You've probably joined an array into a comma separated string before. But what about when you want the last one to say "and"? With Laravel collections it's a breeze π
Daniel Eckermann
#collections
#Laravel Tip: If you have a collection, and you want to get items from the end of it, you may pass a negative integer to `take()` method to take the specified number of items from the end: Here is an example:
Oussama Sid
#http #cheatsheet
π A #laravel HTTP Client #CheatSheet β‘οΈSome of the methods you can use before you send your request π₯
#storage #cheatsheet
π A #laravel Storage #cheatsheet π₯ #php How many of these methods do you know? π