1 | <?php namespace Distilleries\Expendable\Scopes; |
||
7 | class TranslatableScope implements Scope { |
||
8 | |||
9 | /** |
||
10 | * All of the extensions to be added to the builder. |
||
11 | * |
||
12 | * @var array |
||
13 | */ |
||
14 | protected $extensions = ['WithoutTranslation']; |
||
15 | |||
16 | |||
17 | /** |
||
18 | * Apply the scope to a given Eloquent query builder. |
||
19 | * |
||
20 | * @param \Illuminate\Database\Eloquent\Builder $builder |
||
21 | * @param \Illuminate\Database\Eloquent\Model $model |
||
22 | * @return void |
||
23 | */ |
||
24 | public function apply(Builder $builder, Model $model) |
||
45 | |||
46 | /** |
||
47 | * Extend the query builder with the needed functions. |
||
48 | * |
||
49 | * @param \Illuminate\Database\Eloquent\Builder $builder |
||
50 | * @return void |
||
51 | */ |
||
52 | public function extend(Builder $builder) |
||
59 | |||
60 | |||
61 | /** |
||
62 | * Add the with-trashed extension to the builder. |
||
63 | * |
||
64 | * @param \Illuminate\Database\Eloquent\Builder $builder |
||
65 | * @return void |
||
66 | */ |
||
67 | protected function addWithoutTranslation(Builder $builder) |
||
73 | } |