@@ -1,6 +1,6 @@ |
||
1 | 1 | <?php |
2 | 2 | |
3 | -Route::group(['middleware' => ['web', 'admin']], function () { |
|
3 | +Route::group(['middleware' => ['web', 'admin']], function() { |
|
4 | 4 | Route::get('/manager/add', 'Larafolio\Http\Controllers\ProjectController@create')->name('add-project'); |
5 | 5 | |
6 | 6 | Route::get('/manager', 'Larafolio\Http\Controllers\DashboardController@index')->name('dashboard'); |
@@ -119,7 +119,7 @@ |
||
119 | 119 | protected function setOrder(array $data) |
120 | 120 | { |
121 | 121 | return collect($data)->sortBy('order') |
122 | - ->map(function ($item, $key) { |
|
122 | + ->map(function($item, $key) { |
|
123 | 123 | $item['order'] = $key; |
124 | 124 | |
125 | 125 | return $item; |
@@ -14,10 +14,10 @@ discard block |
||
14 | 14 | /** |
15 | 15 | * Add a blocks and links to model. |
16 | 16 | * |
17 | - * @param Larafolio\Models\HasContent $model Model to add extras to. |
|
17 | + * @param HasContent $model Model to add extras to. |
|
18 | 18 | * @param array $data Array of posted user data. |
19 | 19 | * |
20 | - * @return Larafolio\Models\HasContent |
|
20 | + * @return HasContent |
|
21 | 21 | */ |
22 | 22 | protected function addModelExtras(HasContent $model, array $data) |
23 | 23 | { |
@@ -35,10 +35,10 @@ discard block |
||
35 | 35 | /** |
36 | 36 | * Update a HasContent model and its children. |
37 | 37 | * |
38 | - * @param Larafolio\Models\HasContent $model Model to update. |
|
38 | + * @param HasContent $model Model to update. |
|
39 | 39 | * @param array $data Array of posted user data. |
40 | 40 | * |
41 | - * @return Larafolio\Models\HasContent |
|
41 | + * @return HasContent |
|
42 | 42 | */ |
43 | 43 | protected function updateModel(HasContent $model, array $data) |
44 | 44 | { |
@@ -54,9 +54,9 @@ discard block |
||
54 | 54 | /** |
55 | 55 | * Permanently delete a model. |
56 | 56 | * |
57 | - * @param Larafolio\Models\HasContent $model Model to delete. |
|
57 | + * @param HasContent $model Model to delete. |
|
58 | 58 | * |
59 | - * @return bool |
|
59 | + * @return boolean|null |
|
60 | 60 | */ |
61 | 61 | protected function purgeModel(HasContent $model) |
62 | 62 | { |
@@ -89,10 +89,10 @@ discard block |
||
89 | 89 | /** |
90 | 90 | * Add a text block to a model. |
91 | 91 | * |
92 | - * @param Larafolio\Models\HasContent $model Model to add text block to. |
|
92 | + * @param HasContent $model Model to add text block to. |
|
93 | 93 | * @param array $blockData Array of text block data. |
94 | 94 | * |
95 | - * @return Larafolio\Models\HasContent |
|
95 | + * @return Model |
|
96 | 96 | */ |
97 | 97 | public function addBlockToModel(HasContent $model, array $blockData) |
98 | 98 | { |
@@ -102,10 +102,10 @@ discard block |
||
102 | 102 | /** |
103 | 103 | * Update a text block. |
104 | 104 | * |
105 | - * @param Larafolio\Models\TextBlock $textBlock Text block to update. |
|
105 | + * @param TextBlock $textBlock Text block to update. |
|
106 | 106 | * @param array $blockData Array of text block data. |
107 | 107 | * |
108 | - * @return Larafolio\Models\TextBlock |
|
108 | + * @return TextBlock |
|
109 | 109 | */ |
110 | 110 | public function updateTextBlock(TextBlock $textBlock, array $blockData) |
111 | 111 | { |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | /** |
118 | 118 | * Update model text blocks by adding new ones and updating existing ones. |
119 | 119 | * |
120 | - * @param Larafolio\Models\HasContent $model Model that blocks belong to. |
|
120 | + * @param HasContent $model Model that blocks belong to. |
|
121 | 121 | * @param array $data Array of model information. |
122 | 122 | */ |
123 | 123 | public function updateAllTextBlocks(HasContent $model, array $data) |
@@ -138,7 +138,7 @@ discard block |
||
138 | 138 | /** |
139 | 139 | * Remove a text block from a model. |
140 | 140 | * |
141 | - * @param Larafolio\Models\TextBlock $textBlock The text block to delete. |
|
141 | + * @param TextBlock $textBlock The text block to delete. |
|
142 | 142 | * |
143 | 143 | * @return bool|null |
144 | 144 | */ |
@@ -150,10 +150,10 @@ discard block |
||
150 | 150 | /** |
151 | 151 | * Add image to a model. |
152 | 152 | * |
153 | - * @param Larafolio\Models\HasContent $model Model to add image to. |
|
153 | + * @param HasContent $model Model to add image to. |
|
154 | 154 | * @param array $imageData Array of image infomation. |
155 | 155 | * |
156 | - * @return Larafolio\Models\HasContent |
|
156 | + * @return Model |
|
157 | 157 | */ |
158 | 158 | public function addImageToModel(HasContent $model, array $imageData) |
159 | 159 | { |
@@ -163,10 +163,10 @@ discard block |
||
163 | 163 | /** |
164 | 164 | * Update image name and caption. |
165 | 165 | * |
166 | - * @param Larafolio\Models\Image $image Image to update. |
|
166 | + * @param Image $image Image to update. |
|
167 | 167 | * @param array $imageData Array of inmage information. |
168 | 168 | * |
169 | - * @return Larafolio\Models\Image |
|
169 | + * @return Image |
|
170 | 170 | */ |
171 | 171 | public function updateImageInfo(Image $image, array $imageData) |
172 | 172 | { |
@@ -178,7 +178,7 @@ discard block |
||
178 | 178 | /** |
179 | 179 | * Remove image from storage and delete database info. |
180 | 180 | * |
181 | - * @param Larafolio\Models\Image $image Image to remove. |
|
181 | + * @param Image $image Image to remove. |
|
182 | 182 | * |
183 | 183 | * @return bool|null |
184 | 184 | */ |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | /** |
193 | 193 | * Add a link to a model. |
194 | 194 | * |
195 | - * @param Larafolio\Models\HasContent $model Model to add link to. |
|
195 | + * @param HasContent $model Model to add link to. |
|
196 | 196 | * @param array $linkData Array of link info. |
197 | 197 | */ |
198 | 198 | public function addLinkToModel(HasContent $model, array $linkData) |
@@ -203,10 +203,10 @@ discard block |
||
203 | 203 | /** |
204 | 204 | * Update a link. |
205 | 205 | * |
206 | - * @param Larafolio\Models\Link $link Link to update. |
|
206 | + * @param Link $link Link to update. |
|
207 | 207 | * @param array $linkData Array of link data. |
208 | 208 | * |
209 | - * @return Larafolio\Models\Link |
|
209 | + * @return Link |
|
210 | 210 | */ |
211 | 211 | public function updateLink(Link $link, array $linkData) |
212 | 212 | { |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | /** |
219 | 219 | * Update model links by adding new ones and updating existing ones. |
220 | 220 | * |
221 | - * @param Larafolio\Models\HasContent $model Model that links belong to. |
|
221 | + * @param HasContent $model Model that links belong to. |
|
222 | 222 | * @param array $data Array of model information. |
223 | 223 | */ |
224 | 224 | public function updateAllLinks(HasContent $model, array $data) |
@@ -239,7 +239,7 @@ discard block |
||
239 | 239 | /** |
240 | 240 | * Remove link from a model. |
241 | 241 | * |
242 | - * @param Larafolio\Models\Link $link Link to remove. |
|
242 | + * @param Link $link Link to remove. |
|
243 | 243 | * |
244 | 244 | * @return bool|null |
245 | 245 | */ |
@@ -251,7 +251,7 @@ discard block |
||
251 | 251 | /** |
252 | 252 | * Update content associated with model. |
253 | 253 | * |
254 | - * @param Larafolio\Models\HasContent $model Model associated with content. |
|
254 | + * @param HasContent $model Model associated with content. |
|
255 | 255 | * @param string $type Type of model. |
256 | 256 | * @param array $data user posted data. |
257 | 257 | * @param callable $updateCallback Callback to update the content. |
@@ -24,7 +24,7 @@ |
||
24 | 24 | */ |
25 | 25 | public function __construct() |
26 | 26 | { |
27 | - $this->middleware(function ($request, $next) { |
|
27 | + $this->middleware(function($request, $next) { |
|
28 | 28 | $this->user = Auth::user(); |
29 | 29 | |
30 | 30 | return $next($request); |
@@ -21,7 +21,7 @@ |
||
21 | 21 | |
22 | 22 | factory(Project::class) |
23 | 23 | ->create(['name' => $name]) |
24 | - ->each(function (Project $project) { |
|
24 | + ->each(function(Project $project) { |
|
25 | 25 | $project->blocks()->save(factory(TextBlock::class)->make()); |
26 | 26 | |
27 | 27 | $project->links()->save(factory(Link::class)->make()); |
@@ -15,11 +15,11 @@ |
||
15 | 15 | { |
16 | 16 | $projects = Project::all()->sortBy('order')->values(); |
17 | 17 | |
18 | - $images = $projects->mapWithKeys(function (Project $project) { |
|
18 | + $images = $projects->mapWithKeys(function(Project $project) { |
|
19 | 19 | return [$project->name() => $project->getProjectImageUrl()]; |
20 | 20 | }); |
21 | 21 | |
22 | - $blocks = $projects->mapWithKeys(function (Project $project) { |
|
22 | + $blocks = $projects->mapWithKeys(function(Project $project) { |
|
23 | 23 | return [$project->name() => $project->getProjectBlockText()]; |
24 | 24 | }); |
25 | 25 |
@@ -37,7 +37,7 @@ |
||
37 | 37 | $deletedProjects = Project::onlyTrashed() |
38 | 38 | ->orderBy('deleted_at', 'DESC') |
39 | 39 | ->get() |
40 | - ->map(function (Project $project) { |
|
40 | + ->map(function(Project $project) { |
|
41 | 41 | return $project->generateProps(); |
42 | 42 | }); |
43 | 43 |
@@ -17,7 +17,7 @@ |
||
17 | 17 | */ |
18 | 18 | public function applyFilter(Image $image) |
19 | 19 | { |
20 | - return $image->resize(null, 300, function (Constraint $constraint) { |
|
20 | + return $image->resize(null, 300, function(Constraint $constraint) { |
|
21 | 21 | $constraint->aspectRatio(); |
22 | 22 | }); |
23 | 23 | } |
@@ -17,7 +17,7 @@ |
||
17 | 17 | */ |
18 | 18 | public function applyFilter(Image $image) |
19 | 19 | { |
20 | - return $image->resize(null, 80, function (Constraint $constraint) { |
|
20 | + return $image->resize(null, 80, function(Constraint $constraint) { |
|
21 | 21 | $constraint->aspectRatio(); |
22 | 22 | }); |
23 | 23 | } |
@@ -17,7 +17,7 @@ |
||
17 | 17 | */ |
18 | 18 | public function applyFilter(Image $image) |
19 | 19 | { |
20 | - return $image->resize(null, 150, function (Constraint $constraint) { |
|
20 | + return $image->resize(null, 150, function(Constraint $constraint) { |
|
21 | 21 | $constraint->aspectRatio(); |
22 | 22 | }); |
23 | 23 | } |