using ::where laravel code example
Example 1: get all data eloquent laravel
Blog::all();
//example usage.
$posts = Blog::all();
Example 2: query builder laravel
use Illuminate\Database\Eloquent\Builder;
public function scopeFakePersons(Builder $query): Builder
{
return $query->where('is_fake', 1);
}