Articles

Filter Eloquent models with multiple optional filters

Feb 07, 2022

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!

Feb 05, 2022

This title comes from a [Reddit post](https://www.reddit.com/r/laravel/comments/sj1vik/hasone_and_belongsto_confuse_me/) I saw the other day. The post

Read more

Is your site slow? Check your database queries

Feb 03, 2022

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

Read more

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

Feb 02, 2022

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

Read more

Real world example of the power of collections

Jan 29, 2022

You've probably seen a lot of tweets and blog posts about how [collections](https://laravel.com/docs/8.x/collections) can make your code more readable

Read more