@@ -2,8 +2,8 @@ |
||
| 2 | 2 | namespace UniSharp\Categorizable; |
| 3 | 3 | |
| 4 | 4 | use Illuminate\Database\Eloquent\Builder; |
| 5 | -use UniSharp\Categorizable\Models\Category; |
|
| 6 | 5 | use Illuminate\Database\Eloquent\Relations\MorphToMany; |
| 6 | +use UniSharp\Categorizable\Models\Category; |
|
| 7 | 7 | |
| 8 | 8 | trait Categorizable |
| 9 | 9 | { |
@@ -75,6 +75,10 @@ discard block |
||
| 75 | 75 | return array_diff($ids, $this->categories->pluck('id')->toArray()); |
| 76 | 76 | } |
| 77 | 77 | |
| 78 | + /** |
|
| 79 | + * @param string $name |
|
| 80 | + * @param string $table |
|
| 81 | + */ |
|
| 78 | 82 | abstract public function morphToMany( |
| 79 | 83 | $related, |
| 80 | 84 | $name, |
@@ -86,5 +90,8 @@ discard block |
||
| 86 | 90 | $inverse = false |
| 87 | 91 | ); |
| 88 | 92 | |
| 93 | + /** |
|
| 94 | + * @param string $relations |
|
| 95 | + */ |
|
| 89 | 96 | abstract public function load($relations); |
| 90 | 97 | } |
@@ -2,8 +2,8 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace UniSharp\Categorizable\Models; |
| 4 | 4 | |
| 5 | -use Kalnoy\Nestedset\NodeTrait; |
|
| 6 | 5 | use Illuminate\Database\Eloquent\Model; |
| 6 | +use Kalnoy\Nestedset\NodeTrait; |
|
| 7 | 7 | |
| 8 | 8 | class Category extends Model |
| 9 | 9 | { |