Make Reusable queries using Query Scope in Laravel

In Laravel with the use of scope in Model, you can save time of writing the same script in multiple places in your project.

For example, selecting records based on their status – active/inactive/suspended.

The query scope methods are prefixed by scope.

In this tutorial, I show how you can create a reusable query using Query scope in Laravel 9.

Make Reusable queries using Query Scope in Laravel

Read more

How to Add Remove package using Composer in Laravel

Laravel does not come with pre-installed packages. You will need to install them manually before you can make use of them in your project.

Installing these packages using composer is simple if you know the exact package names or their GitHub repositories.

In this tutorial, I show how you can add remove package using composer in Laravel.

How to add remove package using composer in Laravel

Read more