App\Models\CompanyableChildScope Class Reference

Handle query scoping for full company support. More...

Inheritance diagram for App\Models\CompanyableChildScope:

Public Member Functions

 apply (Builder $builder, Model $model)
 Apply the scope to a given Eloquent query builder. More...
 
 remove (Builder $builder)
 

Detailed Description

Handle query scoping for full company support.

Todo:
Move this to a more Laravel 5.2 esque way
Version
v1.0

Definition at line 14 of file CompanyableChildScope.php.

Member Function Documentation

App\Models\CompanyableChildScope::apply ( Builder  $builder,
Model  $model 
)

Apply the scope to a given Eloquent query builder.

Parameters
\Illuminate\Database\Eloquent\Builder$builder
Returns
void

Definition at line 22 of file CompanyableChildScope.php.

23  {
24  $model = $builder->getModel();
25  return Company::scopeCompanyableChildren($model->getCompanyableParents(), $builder);
26  }
static scopeCompanyableChildren(array $companyable_names, $query)
Definition: Company.php:139
App\Models\CompanyableChildScope::remove ( Builder  $builder)
Todo:
IMPLEMENT Remove the scope from the given Eloquent query builder.
Parameters
\Illuminate\Database\Eloquent\Builder$builder
Returns
void

Definition at line 35 of file CompanyableChildScope.php.

36  {
37  }

The documentation for this class was generated from the following file: