Uma pausa nas telas

Esquisito isso de ouvir seu coração bater — já ouviu? Parece que tem alguma coisa te chamando lá dentro. Acontece quando você respira fundo e sente o ar encher os pulmões e esvaziar devagar…essa…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Make where clause more readable in laravel

Lets say we have User model and in some scenario we have to get user record by id or email or any other field. Lets take id for example.

So normally we write below line of code to get the user record by id.

And this code works fine and there is nothing wrong with this code. But we can write this code so it is more readable.

Hope this post is helpful.

Add a comment

Related posts:

5 Common Errors Stopping You From Leading Effectively

Leadership is a process. And you’re continually honing your skills as a leader. Whether you choose to accept it or not, your life has some form of leadership built-in. Some of us have leadership…

About me

I am a Berlin-based self-employed software architect with deep experience in B2C and B2B e-commerce. I can join your project and support you on three areas: To become a successful IT driven company…

Modifying These Four Activities And Attitudes Will Increase Your Sales

The money made from sales is what keeps a company afloat. However, there is typically a wide disparity in output between the best and the rest of a sales team that works together. Closing this sales…