Hey, my book is finally available. Find it here.  Eloquent Beyond The Basics!

Articles

Filter Eloquent models with multiple optional filters

2 years ago

Often we need to filter eloquent models when displaying to a view. If we have a small number of filters this can be fine, but if you need to add more...

Read more

hasOne and belongsTo confuse me!

2 years ago

This title comes from a Reddit post I saw the other day. The poster argues that the hasOne() and belongsTo() model methods are "counter-intuitive". My...

Read more

Is your site slow? Check your database queries

2 years ago

Is your website slow? does it take ages to load? Are the users complaining that it's almost unusable?. You should check your database queries. And I'm...

Read more

You should never use env() outside of your config files

2 years ago

I've seen a couple of questions on laravel forums that look something like this. .env Not Reading Variables Sometimes env() / getenv() Sometimes No...

Read more

Real world example of the power of collections

2 years ago

You've probably seen a lot of tweets and blog posts about how collections can make your code more readable and compact, reducing if statements and ugl...

Read more