Working With Scopes In Laravel

Sometimes you run into a situation when you have to reuse some of the conditions more, with the help of scopes we can easily reuse or create common functionality for particular queries. Laravel scopes provide a way to define model functions that especially run on query methods. In this tutorial, we will show you how

Learn More

How to Check Table Or Column Exists In Laravel

While working on an enterprise-level project, it commonly occurs that we want to create a particular table or column into a table that already exists and that shows an error. In this tutorial, we will see how to check particular table or column exists or not. Typical migration looks like below code: When we run

Learn More

Order Data By Mutator Attribute In Laravel

Accessor and mutator help us to change data by custom functionally automatically. While working with a mutator sometimes we need to order or sort data by mutator column. But the Eloquent model’s orderBy() method doesn’t work with mutator value. So how to order data by mutator column value? In this article, we will create a

Learn More

Understanding Route Model Binding in Laravel

In Laravel, a popular PHP framework, there are numerous features designed to simplify and streamline web development tasks. One such feature is Route Model Binding, which offers an efficient and elegant way to retrieve database records based on route parameters. In this article, we will explain what Route Model Binding is, why it is beneficial,

Learn More