3
0
mirror of https://github.com/snipe/snipe-it.git synced 2026-04-03 14:28:32 +00:00
Files
snipe-it/app/Models/CompanyableScope.php
2026-03-13 15:55:28 +00:00

36 lines
740 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Scope;
/**
* Handle query scoping for full company support.
*
* @todo Move this to a more Laravel 5.2 esque way
*
* @version v1.0
*/
final class CompanyableScope implements Scope
{
/**
* Apply the scope to a given Eloquent query 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.
*
* @return void
*/
public function remove(Builder $builder) {}
}