You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
336 B
18 lines
336 B
<?php
|
|
|
|
|
|
namespace App\Scopes;
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Builder;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Scope;
|
|
|
|
class BusinessScope implements Scope
|
|
{
|
|
|
|
public function apply(Builder $builder, Model $model)
|
|
{
|
|
$builder->where('business_id', '=', request('business_id'));
|
|
}
|
|
}
|