Introduction
Laravel is one of the most used and most advanced frameworks ever developed in PHP, If you are here you must be already using it, So today we will discuss one of the Querying advanced methods in Laravel that will save you time as well and also will be an optimized way of querying data.
Local Scopes
It is a querying method in Laravel in which we can create a specific scope or you could say it is a function in a Model file that can query data that is used redundantly all over the project, let me simplify it with an example.
Suppose we want to query a User having status as 1 which means active and its email is verified