global scopes laravel code example
Example 1: laravel delete where
DB::table('users')->where('id', $id)->delete();
Example 2: laravel scope
public function apply(Builder $builder, Model $model)
{
$builder->where('age', '>', 200);
}