@@ -170,8 +170,8 @@ |
||
| 170 | 170 | { |
| 171 | 171 | // Could swap this out for model -> getAttribute, then check if we have an attribute or a relation... getRelationValue() is helpful |
| 172 | 172 | if (method_exists($this->model, $key) && is_a(call_user_func_array([$this->model, $key], []), 'Illuminate\Database\Eloquent\Relations\Relation')) { |
| 173 | - foreach ($this->{$action.'Relations'} as $relationship => $method) { |
|
| 174 | - if (is_a(call_user_func_array([$this->model, $key], []), 'Illuminate\Database\Eloquent\Relations\\'.$relationship)) { |
|
| 173 | + foreach ($this->{$action . 'Relations'} as $relationship => $method) { |
|
| 174 | + if (is_a(call_user_func_array([$this->model, $key], []), 'Illuminate\Database\Eloquent\Relations\\' . $relationship)) { |
|
| 175 | 175 | $this->model->$key()->$method($value); |
| 176 | 176 | |
| 177 | 177 | return; |
@@ -9,7 +9,6 @@ |
||
| 9 | 9 | use LaravelFlare\Flare\Events\AfterRestore; |
| 10 | 10 | use LaravelFlare\Flare\Events\BeforeRestore; |
| 11 | 11 | use LaravelFlare\Flare\Events\ModelSoftDelete; |
| 12 | -use LaravelFlare\Flare\Exceptions\ModelAdminWriteableException as WriteableException; |
|
| 13 | 12 | |
| 14 | 13 | trait ModelSoftDeleting |
| 15 | 14 | { |
@@ -33,6 +33,7 @@ |
||
| 33 | 33 | * Create a new collection. |
| 34 | 34 | * |
| 35 | 35 | * @param mixed $items |
| 36 | + * @param ModelAdmin $modelManager |
|
| 36 | 37 | */ |
| 37 | 38 | public function __construct($items = [], $modelManager = null) |
| 38 | 39 | { |
@@ -9,7 +9,6 @@ |
||
| 9 | 9 | use LaravelFlare\Flare\Events\AfterRestore; |
| 10 | 10 | use LaravelFlare\Flare\Events\BeforeRestore; |
| 11 | 11 | use LaravelFlare\Flare\Events\ModelSoftDelete; |
| 12 | -use LaravelFlare\Flare\Exceptions\ModelAdminWriteableException as WriteableException; |
|
| 13 | 12 | |
| 14 | 13 | trait ModelSoftDeleting |
| 15 | 14 | { |
@@ -9,7 +9,6 @@ |
||
| 9 | 9 | use LaravelFlare\Flare\Events\AfterRestore; |
| 10 | 10 | use LaravelFlare\Flare\Events\BeforeRestore; |
| 11 | 11 | use LaravelFlare\Flare\Events\ModelSoftDelete; |
| 12 | -use LaravelFlare\Flare\Exceptions\ModelAdminWriteableException as WriteableException; |
|
| 13 | 12 | |
| 14 | 13 | trait ModelSoftDeleting |
| 15 | 14 | { |
@@ -138,6 +138,7 @@ |
||
| 138 | 138 | /** |
| 139 | 139 | * Performs the Model Query |
| 140 | 140 | * |
| 141 | + * @param boolean $count |
|
| 141 | 142 | * @return \Illuminate\Database\Eloquent\Collection |
| 142 | 143 | */ |
| 143 | 144 | private function query($count) |