1. Chained dd and dump

Have you ever written a block of code like this?

$users = User::all();

dd($users);

It’s not awful, but it is annoying that you need to assign the result of User::all() (an instance of Collection) to a variable just to dump and die. Turns out, you don’t actually need to. Instead, you can use the dd or dump method on the Collection class instead and turn this into a one-liner.

**2. **Auth::id()

3. Default Relationship Models

4. Custom Blade Directives

5. Better Intellisense

#laravel

 5 Simple Laravel Tips and Tricks
1.45 GEEK