@@ -2,11 +2,11 @@ |
||
2 | 2 | |
3 | 3 | use Illuminate\Support\Collection; |
4 | 4 | |
5 | -if (! Collection::hasMacro('objectIfEmpty')) { |
|
5 | +if (!Collection::hasMacro('objectIfEmpty')) { |
|
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 | } |
@@ -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 |