mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-09 23:24:06 -08:00
32 lines
741 B
PHP
32 lines
741 B
PHP
<?php
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use \Illuminate\Database\Eloquent\Builder;
|
|
use \Illuminate\Database\Eloquent\Scope;
|
|
|
|
final class CompanyableScope implements Scope
|
|
{
|
|
/**
|
|
* Apply the scope to a given Eloquent query builder.
|
|
*
|
|
* @param \Illuminate\Database\Eloquent\Builder $builder
|
|
* @return void
|
|
*/
|
|
public function apply(Builder $builder, Model $model)
|
|
{
|
|
return Company::scopeCompanyables($builder);
|
|
}
|
|
|
|
/**
|
|
* @todo IMPLEMENT
|
|
* Remove the scope from the given Eloquent query builder.
|
|
*
|
|
* @param \Illuminate\Database\Eloquent\Builder $builder
|
|
* @return void
|
|
*/
|
|
public function remove(Builder $builder)
|
|
{
|
|
}
|
|
}
|