@@ -55,7 +55,7 @@ |
||
55 | 55 | * |
56 | 56 | * @param \Symfony\Component\Finder\SplFileInfo $image File info. |
57 | 57 | * @param string $path Path to move to. |
58 | - * @param /Illuminate\Filesystem\Filesystem $filesystem |
|
58 | + * @param Filesystem $filesystem |
|
59 | 59 | */ |
60 | 60 | protected function moveImage($image, $path, $filesystem) |
61 | 61 | { |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | * Update image name and caption. |
12 | 12 | * |
13 | 13 | * @param \Illuminate\Http\Request $request Request object. |
14 | - * @param Larafolio\Models\Image $image Image to be updated. |
|
14 | + * @param Image $image Image to be updated. |
|
15 | 15 | * |
16 | 16 | * @return \Illuminate\Http\Response |
17 | 17 | */ |
@@ -31,7 +31,7 @@ discard block |
||
31 | 31 | /** |
32 | 32 | * Remove image from portfolio. |
33 | 33 | * |
34 | - * @param Larafolio\Models\Image $image Image to be removed. |
|
34 | + * @param Image $image Image to be removed. |
|
35 | 35 | * |
36 | 36 | * @return \Illuminate\Http\Response |
37 | 37 | */ |
@@ -11,9 +11,9 @@ discard block |
||
11 | 11 | /** |
12 | 12 | * Remove a link. |
13 | 13 | * |
14 | - * @param Larafolio\Models\Link $link Link to remove. |
|
14 | + * @param Link $link Link to remove. |
|
15 | 15 | * |
16 | - * @return \Illuminate\Http\Response |
|
16 | + * @return \Illuminate\Http\JsonResponse |
|
17 | 17 | */ |
18 | 18 | public function destroy(Link $link) |
19 | 19 | { |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | * @param Request $request Http request with 'url'. |
29 | 29 | * @param HttpValidator $httpValidator Instance of http validator class. |
30 | 30 | * |
31 | - * @return \Illuminate\Http\Response |
|
31 | + * @return \Illuminate\Http\JsonResponse |
|
32 | 32 | */ |
33 | 33 | public function check(Request $request, HttpValidator $httpValidator) |
34 | 34 | { |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | /** |
12 | 12 | * Return all projects. |
13 | 13 | * |
14 | - * @return \Illuminate\Http\Response |
|
14 | + * @return \Illuminate\Http\JsonResponse |
|
15 | 15 | */ |
16 | 16 | public function index() |
17 | 17 | { |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | /** |
55 | 55 | * Add a new project to the portfolio. |
56 | 56 | * |
57 | - * @param Larafolio\Http\Requests\AddProjectRequest $request Form request. |
|
57 | + * @param AddProjectRequest $request Form request. |
|
58 | 58 | * |
59 | 59 | * @return \Illuminate\Http\Response |
60 | 60 | */ |
@@ -11,7 +11,7 @@ discard block |
||
11 | 11 | * |
12 | 12 | * @param array $data Array of data to save. |
13 | 13 | * |
14 | - * @return Larafolio\Models\Project |
|
14 | + * @return Project |
|
15 | 15 | */ |
16 | 16 | public function addProject(array $data) |
17 | 17 | { |
@@ -33,10 +33,10 @@ discard block |
||
33 | 33 | /** |
34 | 34 | * Update a project in the portfolio. |
35 | 35 | * |
36 | - * @param Larafolio\Models\Project $project Project to update. |
|
36 | + * @param Project $project Project to update. |
|
37 | 37 | * @param array $data Array of data to save. |
38 | 38 | * |
39 | - * @return bool |
|
39 | + * @return Project |
|
40 | 40 | */ |
41 | 41 | public function updateProject(Project $project, array $data) |
42 | 42 | { |
@@ -52,9 +52,9 @@ discard block |
||
52 | 52 | /** |
53 | 53 | * Remove a project from the portfolio. |
54 | 54 | * |
55 | - * @param Larafolio\Models\Project $project Project to remove. |
|
55 | + * @param Project $project Project to remove. |
|
56 | 56 | * |
57 | - * @return bool |
|
57 | + * @return boolean|null |
|
58 | 58 | */ |
59 | 59 | public function removeProject(Project $project) |
60 | 60 | { |
@@ -64,9 +64,9 @@ discard block |
||
64 | 64 | /** |
65 | 65 | * Restore a soft deleted project. |
66 | 66 | * |
67 | - * @param Larafolio\Models\Project $project Project to restore. |
|
67 | + * @param Project $project Project to restore. |
|
68 | 68 | * |
69 | - * @return bool |
|
69 | + * @return boolean|null |
|
70 | 70 | */ |
71 | 71 | public function restoreProject(Project $project) |
72 | 72 | { |
@@ -78,9 +78,9 @@ discard block |
||
78 | 78 | /** |
79 | 79 | * Hard delete a project from the portfolio. |
80 | 80 | * |
81 | - * @param Larafolio\Models\Project $project Project to purge. |
|
81 | + * @param Project $project Project to purge. |
|
82 | 82 | * |
83 | - * @return bool |
|
83 | + * @return boolean|null |
|
84 | 84 | */ |
85 | 85 | public function purgeProject(Project $project) |
86 | 86 | { |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | * |
115 | 115 | * @param array $data Data array containing 'order' index. |
116 | 116 | * |
117 | - * @return Collection |
|
117 | + * @return \Illuminate\Support\Collection |
|
118 | 118 | */ |
119 | 119 | protected function setOrder(array $data) |
120 | 120 | { |
@@ -129,10 +129,10 @@ discard block |
||
129 | 129 | /** |
130 | 130 | * Add a text block to a project. |
131 | 131 | * |
132 | - * @param Larafolio\Models\Project $project Project to add text block to. |
|
132 | + * @param Project $project Project to add text block to. |
|
133 | 133 | * @param array $blockData Array of text block data. |
134 | 134 | * |
135 | - * @return Larafolio\Models\TextBlock |
|
135 | + * @return \Illuminate\Database\Eloquent\Model |
|
136 | 136 | */ |
137 | 137 | public function addBlockToProject(Project $project, array $blockData) |
138 | 138 | { |
@@ -142,10 +142,10 @@ discard block |
||
142 | 142 | /** |
143 | 143 | * Update a text block. |
144 | 144 | * |
145 | - * @param Larafolio\Models\TextBlock $textBlock Text block to update. |
|
145 | + * @param TextBlock $textBlock Text block to update. |
|
146 | 146 | * @param array $blockData Array of text block data. |
147 | 147 | * |
148 | - * @return Larafolio\Models\TextBlock |
|
148 | + * @return TextBlock |
|
149 | 149 | */ |
150 | 150 | public function updateTextBlock(TextBlock $textBlock, array $blockData) |
151 | 151 | { |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | /** |
158 | 158 | * Update project text blocks by adding new ones and updating existing ones. |
159 | 159 | * |
160 | - * @param Larafolio\Models\Project $project Project that blocks belong to. |
|
160 | + * @param Project $project Project that blocks belong to. |
|
161 | 161 | * @param array $data Array of project information. |
162 | 162 | */ |
163 | 163 | public function updateProjectTextBlocks(Project $project, array $data) |
@@ -180,9 +180,9 @@ discard block |
||
180 | 180 | /** |
181 | 181 | * Remove a text block from a project. |
182 | 182 | * |
183 | - * @param Larafolio\Models\TextBlock $textBlock The text block to delete. |
|
183 | + * @param TextBlock $textBlock The text block to delete. |
|
184 | 184 | * |
185 | - * @return bool |
|
185 | + * @return boolean|null |
|
186 | 186 | */ |
187 | 187 | public function removeTextBlock(TextBlock $textBlock) |
188 | 188 | { |
@@ -192,10 +192,10 @@ discard block |
||
192 | 192 | /** |
193 | 193 | * Add image to a project. |
194 | 194 | * |
195 | - * @param Larafolio\Models\Project $project Project to add image to. |
|
195 | + * @param Project $project Project to add image to. |
|
196 | 196 | * @param array $imageData Array of image infomation. |
197 | 197 | * |
198 | - * @return Larafolio\Models\Image |
|
198 | + * @return \Illuminate\Database\Eloquent\Model |
|
199 | 199 | */ |
200 | 200 | public function addImageToProject(Project $project, array $imageData) |
201 | 201 | { |
@@ -205,10 +205,10 @@ discard block |
||
205 | 205 | /** |
206 | 206 | * Update image name and caption. |
207 | 207 | * |
208 | - * @param Larafolio\Models\Image $image Image to update. |
|
208 | + * @param Image $image Image to update. |
|
209 | 209 | * @param array $imageData Array of inmage information. |
210 | 210 | * |
211 | - * @return Larafolio\Models\Image |
|
211 | + * @return Image |
|
212 | 212 | */ |
213 | 213 | public function updateImageInfo(Image $image, array $imageData) |
214 | 214 | { |
@@ -220,9 +220,9 @@ discard block |
||
220 | 220 | /** |
221 | 221 | * Remove image from storage and delete database info. |
222 | 222 | * |
223 | - * @param Larafolio\Models\Image $image Image to remove. |
|
223 | + * @param Image $image Image to remove. |
|
224 | 224 | * |
225 | - * @return bool |
|
225 | + * @return boolean|null |
|
226 | 226 | */ |
227 | 227 | public function removeImage(Image $image) |
228 | 228 | { |
@@ -234,7 +234,7 @@ discard block |
||
234 | 234 | /** |
235 | 235 | * Add a link to a project. |
236 | 236 | * |
237 | - * @param Larafolio\Models\Project $project Project to add link to. |
|
237 | + * @param Project $project Project to add link to. |
|
238 | 238 | * @param array $linkData Array of link info. |
239 | 239 | */ |
240 | 240 | public function addLinkToProject(Project $project, array $linkData) |
@@ -245,10 +245,10 @@ discard block |
||
245 | 245 | /** |
246 | 246 | * Update a link. |
247 | 247 | * |
248 | - * @param Larafolio\Models\Link $link Link to update. |
|
248 | + * @param Link $link Link to update. |
|
249 | 249 | * @param array $linkData Array of link data. |
250 | 250 | * |
251 | - * @return Larafolio\Models\Link |
|
251 | + * @return Link |
|
252 | 252 | */ |
253 | 253 | public function updateLink(Link $link, array $linkData) |
254 | 254 | { |
@@ -260,7 +260,7 @@ discard block |
||
260 | 260 | /** |
261 | 261 | * Update project links by adding new ones and updating existing ones. |
262 | 262 | * |
263 | - * @param Larafolio\Models\Project $project Project that links belong to. |
|
263 | + * @param Project $project Project that links belong to. |
|
264 | 264 | * @param array $data Array of project information. |
265 | 265 | */ |
266 | 266 | public function updateProjectLinks(Project $project, array $data) |
@@ -283,9 +283,9 @@ discard block |
||
283 | 283 | /** |
284 | 284 | * Remove link from a project. |
285 | 285 | * |
286 | - * @param Larafolio\Models\Link $link Link to remove. |
|
286 | + * @param Link $link Link to remove. |
|
287 | 287 | * |
288 | - * @return bool |
|
288 | + * @return boolean|null |
|
289 | 289 | */ |
290 | 290 | public function removeLink(Link $link) |
291 | 291 | { |
@@ -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; |
@@ -308,7 +308,7 @@ discard block |
||
308 | 308 | * |
309 | 309 | * @param string $name Name of text block to get. |
310 | 310 | * |
311 | - * @return Larafolio\Models\TextBlock |
|
311 | + * @return Model|null |
|
312 | 312 | */ |
313 | 313 | public function block($name) |
314 | 314 | { |
@@ -387,7 +387,7 @@ discard block |
||
387 | 387 | * |
388 | 388 | * @param string $name Name of image to get. |
389 | 389 | * |
390 | - * @return Larafolio\Models\Image|null |
|
390 | + * @return Model|null |
|
391 | 391 | */ |
392 | 392 | public function image($name) |
393 | 393 | { |
@@ -492,7 +492,7 @@ discard block |
||
492 | 492 | * |
493 | 493 | * @param string $name Name of link to get. |
494 | 494 | * |
495 | - * @return Larafolio\Models\Link|null |
|
495 | + * @return Model|null |
|
496 | 496 | */ |
497 | 497 | public function link($name) |
498 | 498 | { |
@@ -66,11 +66,11 @@ discard block |
||
66 | 66 | { |
67 | 67 | parent::boot(); |
68 | 68 | |
69 | - static::creating(function ($project) { |
|
69 | + static::creating(function($project) { |
|
70 | 70 | $project->setSlug('name'); |
71 | 71 | }); |
72 | 72 | |
73 | - static::updating(function ($project) { |
|
73 | + static::updating(function($project) { |
|
74 | 74 | $project->setSlug('name'); |
75 | 75 | }); |
76 | 76 | } |
@@ -152,7 +152,7 @@ discard block |
||
152 | 152 | |
153 | 153 | if ($group) { |
154 | 154 | return $query->get() |
155 | - ->each(function ($project, $key) { |
|
155 | + ->each(function($project, $key) { |
|
156 | 156 | $project->index = $key; |
157 | 157 | }) |
158 | 158 | ->groupBy('type'); |
@@ -587,7 +587,7 @@ discard block |
||
587 | 587 | public function imagesWithProps() |
588 | 588 | { |
589 | 589 | return $this->images |
590 | - ->map(function ($image) { |
|
590 | + ->map(function($image) { |
|
591 | 591 | return $image->generateProps(); |
592 | 592 | })->reverse()->values(); |
593 | 593 | } |
@@ -602,7 +602,7 @@ discard block |
||
602 | 602 | */ |
603 | 603 | public function scopeOrderRelationship($query, $relationship) |
604 | 604 | { |
605 | - return $query->with([$relationship => function ($query) { |
|
605 | + return $query->with([$relationship => function($query) { |
|
606 | 606 | $query->orderBy('order'); |
607 | 607 | }]); |
608 | 608 | } |
@@ -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'); |
@@ -21,7 +21,7 @@ |
||
21 | 21 | |
22 | 22 | factory(Project::class) |
23 | 23 | ->create(['name' => $name]) |
24 | - ->each(function ($project) { |
|
24 | + ->each(function($project) { |
|
25 | 25 | $project->blocks()->save(factory(TextBlock::class)->make()); |
26 | 26 | |
27 | 27 | $project->links()->save(factory(Link::class)->make()); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::create('password_resets', function (Blueprint $table) { |
|
16 | + Schema::create('password_resets', function(Blueprint $table) { |
|
17 | 17 | $table->string('email')->index(); |
18 | 18 | $table->string('token')->index(); |
19 | 19 | $table->timestamp('created_at')->nullable(); |