CompanyableScope.php
Go to the documentation of this file.
1 <?php
2 namespace App\Models;
3 
5 use \Illuminate\Database\Eloquent\Builder;
6 use \Illuminate\Database\Eloquent\Scope;
7 
14 final class CompanyableScope implements Scope
15 {
22  public function apply(Builder $builder, Model $model)
23  {
24  return Company::scopeCompanyables($builder);
25  }
26 
34  public function remove(Builder $builder)
35  {
36  }
37 }
apply(Builder $builder, Model $model)
Apply the scope to a given Eloquent query builder.
Handle query scoping for full company support.
static scopeCompanyables($query, $column= 'company_id')
Definition: Company.php:130