@@ -26,6 +26,9 @@ |
||
| 26 | 26 | return $this->model->withDepth()->find($id, $columns); |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | + /** |
|
| 30 | + * @param string $name |
|
| 31 | + */ |
|
| 29 | 32 | public function tree($name) |
| 30 | 33 | { |
| 31 | 34 | $root = $this->findBy('name', $name); |
@@ -97,6 +97,9 @@ |
||
| 97 | 97 | } |
| 98 | 98 | } |
| 99 | 99 | |
| 100 | + /** |
|
| 101 | + * @param string $name |
|
| 102 | + */ |
|
| 100 | 103 | public function getUniqueUsername($name) |
| 101 | 104 | { |
| 102 | 105 | $nrRand = rand(0,100); |
@@ -29,6 +29,9 @@ discard block |
||
| 29 | 29 | $this->makeModel(); |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | + /** |
|
| 33 | + * @return string |
|
| 34 | + */ |
|
| 32 | 35 | abstract public function model(); |
| 33 | 36 | |
| 34 | 37 | public function all($columns = ['*']) |
@@ -96,6 +99,9 @@ discard block |
||
| 96 | 99 | return $this->model->findOrCreate($data); |
| 97 | 100 | } |
| 98 | 101 | |
| 102 | + /** |
|
| 103 | + * @param string $attribute |
|
| 104 | + */ |
|
| 99 | 105 | public function findBy($attribute, $value, $columns = array('*')) |
| 100 | 106 | { |
| 101 | 107 | $this->applyCriteria(); |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | |
| 36 | 36 | /** |
| 37 | 37 | * Get similar slugs |
| 38 | - * @param $slug |
|
| 38 | + * @param string $slug |
|
| 39 | 39 | * @param $id |
| 40 | 40 | * @return mixed |
| 41 | 41 | */ |