@@ -21,7 +21,7 @@ |
||
21 | 21 | |
22 | 22 | factory(Page::class) |
23 | 23 | ->create(['name' => $name]) |
24 | - ->each(function (Page $project) { |
|
24 | + ->each(function(Page $project) { |
|
25 | 25 | $project->blocks()->save(factory(TextBlock::class)->make()); |
26 | 26 | |
27 | 27 | $project->links()->save(factory(Link::class)->make()); |
@@ -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', 'Larafolio\Http\Controllers\PortfolioController@index')->name('dashboard'); |
5 | 5 | |
6 | 6 | Route::patch('/manager', 'Larafolio\Http\Controllers\PortfolioController@update')->name('update-portfolio'); |
@@ -18,11 +18,11 @@ |
||
18 | 18 | { |
19 | 19 | $projects = Project::all()->sortBy('order')->values(); |
20 | 20 | |
21 | - $projectImages = $projects->mapWithKeys(function (Project $project) { |
|
21 | + $projectImages = $projects->mapWithKeys(function(Project $project) { |
|
22 | 22 | return [$project->name() => $project->getProjectImageUrl()]; |
23 | 23 | })->objectIfEmpty(); |
24 | 24 | |
25 | - $projectBlocks = $projects->mapWithKeys(function (Project $project) { |
|
25 | + $projectBlocks = $projects->mapWithKeys(function(Project $project) { |
|
26 | 26 | return [$project->name() => $project->getProjectBlockText()]; |
27 | 27 | })->objectIfEmpty(); |
28 | 28 |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | $deletedProjects = Project::onlyTrashed() |
39 | 39 | ->orderBy('deleted_at', 'DESC') |
40 | 40 | ->get() |
41 | - ->map(function (Project $project) { |
|
41 | + ->map(function(Project $project) { |
|
42 | 42 | return $project->generateProps(); |
43 | 43 | }); |
44 | 44 | |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | $deletedPages = Page::onlyTrashed() |
58 | 58 | ->orderBy('deleted_at', 'DESC') |
59 | 59 | ->get() |
60 | - ->map(function (Page $page) { |
|
60 | + ->map(function(Page $page) { |
|
61 | 61 | return $page->generateProps(); |
62 | 62 | }); |
63 | 63 |
@@ -54,7 +54,7 @@ |
||
54 | 54 | * |
55 | 55 | * @param string $name Name of text block to get. |
56 | 56 | * |
57 | - * @return \Larafolio\Models\TextBlock|null |
|
57 | + * @return \Illuminate\Database\Eloquent\Model|null |
|
58 | 58 | */ |
59 | 59 | public function block($name) |
60 | 60 | { |
@@ -54,7 +54,7 @@ |
||
54 | 54 | * |
55 | 55 | * @param string $name Name of link to get. |
56 | 56 | * |
57 | - * @return \Larafolio\Models\Link|null |
|
57 | + * @return \Illuminate\Database\Eloquent\Model|null |
|
58 | 58 | */ |
59 | 59 | public function link($name) |
60 | 60 | { |
@@ -6,7 +6,7 @@ |
||
6 | 6 | /* |
7 | 7 | * Dump the arguments given followed by the collection. |
8 | 8 | */ |
9 | - Collection::macro('objectIfEmpty', function () { |
|
9 | + Collection::macro('objectIfEmpty', function() { |
|
10 | 10 | if ($this->isEmpty()) { |
11 | 11 | return new \stdClass(); |
12 | 12 | } |