@@ -53,11 +53,11 @@ discard block |
||
| 53 | 53 | { |
| 54 | 54 | parent::boot(); |
| 55 | 55 | |
| 56 | - static::creating(function (Model $model) { |
|
| 56 | + static::creating(function(Model $model) { |
|
| 57 | 57 | $model->setSlug('name'); |
| 58 | 58 | }); |
| 59 | 59 | |
| 60 | - static::updating(function (Model $model) { |
|
| 60 | + static::updating(function(Model $model) { |
|
| 61 | 61 | $model->setSlug('name'); |
| 62 | 62 | }); |
| 63 | 63 | } |
@@ -83,7 +83,7 @@ discard block |
||
| 83 | 83 | |
| 84 | 84 | if ($group) { |
| 85 | 85 | return $query->get() |
| 86 | - ->each(function (Model $model, $key) { |
|
| 86 | + ->each(function(Model $model, $key) { |
|
| 87 | 87 | $model->index = $key; |
| 88 | 88 | }) |
| 89 | 89 | ->groupBy('type'); |
@@ -150,7 +150,7 @@ discard block |
||
| 150 | 150 | */ |
| 151 | 151 | public function scopeOrderRelationship($query, $relationship) |
| 152 | 152 | { |
| 153 | - return $query->with([$relationship => function ($query) { |
|
| 153 | + return $query->with([$relationship => function($query) { |
|
| 154 | 154 | $query->orderBy('order'); |
| 155 | 155 | }]); |
| 156 | 156 | } |
@@ -105,7 +105,7 @@ |
||
| 105 | 105 | public function imagesWithProps() |
| 106 | 106 | { |
| 107 | 107 | return $this->images |
| 108 | - ->map(function (Image $image) { |
|
| 108 | + ->map(function(Image $image) { |
|
| 109 | 109 | return $image->generateProps(); |
| 110 | 110 | })->reverse()->values(); |
| 111 | 111 | } |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | /** |
| 32 | 32 | * A resource has many images. |
| 33 | 33 | * |
| 34 | - * @return MorphMany |
|
| 34 | + * @return \Illuminate\Database\Eloquent\Relations\MorphMany |
|
| 35 | 35 | */ |
| 36 | 36 | public function images() |
| 37 | 37 | { |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | * |
| 54 | 54 | * @param string $name Name of image to get. |
| 55 | 55 | * |
| 56 | - * @return Larafolio\Models\Image|null |
|
| 56 | + * @return \Illuminate\Database\Eloquent\Model|null |
|
| 57 | 57 | */ |
| 58 | 58 | public function image($name) |
| 59 | 59 | { |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | /** |
| 32 | 32 | * A resource has many text blocks. |
| 33 | 33 | * |
| 34 | - * @return MorphMany |
|
| 34 | + * @return \Illuminate\Database\Eloquent\Relations\MorphMany |
|
| 35 | 35 | */ |
| 36 | 36 | public function blocks() |
| 37 | 37 | { |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | * |
| 54 | 54 | * @param string $name Name of text block to get. |
| 55 | 55 | * |
| 56 | - * @return Larafolio\Models\TextBlock|null |
|
| 56 | + * @return \Illuminate\Database\Eloquent\Model|null |
|
| 57 | 57 | */ |
| 58 | 58 | public function block($name) |
| 59 | 59 | { |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | /** |
| 32 | 32 | * A resource has many text blocks. |
| 33 | 33 | * |
| 34 | - * @return MorphMany |
|
| 34 | + * @return \Illuminate\Database\Eloquent\Relations\MorphMany |
|
| 35 | 35 | */ |
| 36 | 36 | public function links() |
| 37 | 37 | { |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | * |
| 54 | 54 | * @param string $name Name of link to get. |
| 55 | 55 | * |
| 56 | - * @return Larafolio\Models\Link|null |
|
| 56 | + * @return \Illuminate\Database\Eloquent\Model|null |
|
| 57 | 57 | */ |
| 58 | 58 | public function link($name) |
| 59 | 59 | { |
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | /** |
| 10 | 10 | * Add a blocks and links to model. |
| 11 | 11 | * |
| 12 | - * @param HasContent $model Model to add extras to. |
|
| 12 | + * @param Page $model Model to add extras to. |
|
| 13 | 13 | * @param array $data Array of posted user data. |
| 14 | 14 | * |
| 15 | 15 | * @return HasContent |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | /** |
| 20 | 20 | * Update a HasContent model and its children. |
| 21 | 21 | * |
| 22 | - * @param HasContent $model Model to update. |
|
| 22 | + * @param Page $model Model to update. |
|
| 23 | 23 | * @param array $data Array of posted user data. |
| 24 | 24 | * |
| 25 | 25 | * @return HasContent |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | /** |
| 30 | 30 | * Permanently delete a model. |
| 31 | 31 | * |
| 32 | - * @param HasContent $model Model to delete. |
|
| 32 | + * @param Page $model Model to delete. |
|
| 33 | 33 | * |
| 34 | 34 | * @return boolean |
| 35 | 35 | */ |
@@ -9,7 +9,7 @@ discard block |
||
| 9 | 9 | /** |
| 10 | 10 | * Add a blocks and links to model. |
| 11 | 11 | * |
| 12 | - * @param HasContent $model Model to add extras to. |
|
| 12 | + * @param Project $model Model to add extras to. |
|
| 13 | 13 | * @param array $data Array of posted user data. |
| 14 | 14 | * |
| 15 | 15 | * @return HasContent |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | /** |
| 20 | 20 | * Update a HasContent model and its children. |
| 21 | 21 | * |
| 22 | - * @param HasContent $model Model to update. |
|
| 22 | + * @param Project $model Model to update. |
|
| 23 | 23 | * @param array $data Array of posted user data. |
| 24 | 24 | * |
| 25 | 25 | * @return HasContent |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | /** |
| 30 | 30 | * Permanently delete a model. |
| 31 | 31 | * |
| 32 | - * @param HasContent $model Model to delete. |
|
| 32 | + * @param Project $model Model to delete. |
|
| 33 | 33 | * |
| 34 | 34 | * @return boolean |
| 35 | 35 | */ |
@@ -65,11 +65,11 @@ discard block |
||
| 65 | 65 | { |
| 66 | 66 | parent::boot(); |
| 67 | 67 | |
| 68 | - static::creating(function (Project $project) { |
|
| 68 | + static::creating(function(Project $project) { |
|
| 69 | 69 | $project->setSlug('name'); |
| 70 | 70 | }); |
| 71 | 71 | |
| 72 | - static::updating(function (Project $project) { |
|
| 72 | + static::updating(function(Project $project) { |
|
| 73 | 73 | $project->setSlug('name'); |
| 74 | 74 | }); |
| 75 | 75 | } |
@@ -342,7 +342,7 @@ discard block |
||
| 342 | 342 | */ |
| 343 | 343 | public function scopeOrderRelationship($query, $relationship) |
| 344 | 344 | { |
| 345 | - return $query->with([$relationship => function ($query) { |
|
| 345 | + return $query->with([$relationship => function($query) { |
|
| 346 | 346 | $query->orderBy('order'); |
| 347 | 347 | }]); |
| 348 | 348 | } |