| @@ -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 | } | 
| @@ -54,7 +54,7 @@ | ||
| 54 | 54 | * | 
| 55 | 55 | * @param string $name Name of text line to get. | 
| 56 | 56 | * | 
| 57 | - * @return \Larafolio\Models\TextBlock|null | |
| 57 | + * @return \Illuminate\Database\Eloquent\Model|null | |
| 58 | 58 | */ | 
| 59 | 59 | public function line($name) | 
| 60 | 60 |      { | 
| @@ -1,7 +1,7 @@ discard block | ||
| 1 | 1 | <?php | 
| 2 | 2 | |
| 3 | 3 | /** @var \Illuminate\Database\Eloquent\Factory $factory */ | 
| 4 | -$factory->define(App\User::class, function (Faker\Generator $faker) { | |
| 4 | +$factory->define(App\User::class, function(Faker\Generator $faker) { | |
| 5 | 5 | static $password; | 
| 6 | 6 | |
| 7 | 7 | return [ | 
| @@ -12,7 +12,7 @@ discard block | ||
| 12 | 12 | ]; | 
| 13 | 13 | }); | 
| 14 | 14 | |
| 15 | -$factory->define(Larafolio\Models\Project::class, function () { | |
| 15 | +$factory->define(Larafolio\Models\Project::class, function() { | |
| 16 | 16 | $name = str_random(30); | 
| 17 | 17 | |
| 18 | 18 | $types = ['web', 'github', 'volunteer']; | 
| @@ -27,7 +27,7 @@ discard block | ||
| 27 | 27 | ]; | 
| 28 | 28 | }); | 
| 29 | 29 | |
| 30 | -$factory->define(Larafolio\Models\Image::class, function (Faker\Generator $faker) { | |
| 30 | +$factory->define(Larafolio\Models\Image::class, function(Faker\Generator $faker) { | |
| 31 | 31 | $project = factory(Larafolio\Models\Project::class)->create(); | 
| 32 | 32 | |
| 33 | 33 | return [ | 
| @@ -37,7 +37,7 @@ discard block | ||
| 37 | 37 | ]; | 
| 38 | 38 | }); | 
| 39 | 39 | |
| 40 | -$factory->define(Larafolio\Models\TextBlock::class, function (Faker\Generator $faker) { | |
| 40 | +$factory->define(Larafolio\Models\TextBlock::class, function(Faker\Generator $faker) { | |
| 41 | 41 | $text = $faker->paragraph(5, true); | 
| 42 | 42 | |
| 43 | 43 | return [ | 
| @@ -48,7 +48,7 @@ discard block | ||
| 48 | 48 | ]; | 
| 49 | 49 | }); | 
| 50 | 50 | |
| 51 | -$factory->define(Larafolio\Models\Link::class, function (Faker\Generator $faker) { | |
| 51 | +$factory->define(Larafolio\Models\Link::class, function(Faker\Generator $faker) { | |
| 52 | 52 | return [ | 
| 53 | 53 | 'name' => $faker->word, | 
| 54 | 54 | 'text' => $faker->sentence, | 
| @@ -57,7 +57,7 @@ discard block | ||
| 57 | 57 | ]; | 
| 58 | 58 | }); | 
| 59 | 59 | |
| 60 | -$factory->define(Larafolio\Models\Page::class, function () { | |
| 60 | +$factory->define(Larafolio\Models\Page::class, function() { | |
| 61 | 61 | $name = str_random(30); | 
| 62 | 62 | |
| 63 | 63 | return [ | 
| @@ -67,7 +67,7 @@ discard block | ||
| 67 | 67 | ]; | 
| 68 | 68 | }); | 
| 69 | 69 | |
| 70 | -$factory->define(Larafolio\Models\TextLine::class, function (Faker\Generator $faker) { | |
| 70 | +$factory->define(Larafolio\Models\TextLine::class, function(Faker\Generator $faker) { | |
| 71 | 71 | return [ | 
| 72 | 72 | 'name' => $faker->word, | 
| 73 | 73 | 'text' => $faker->sentence, | 
| @@ -22,7 +22,7 @@ | ||
| 22 | 22 | |
| 23 | 23 | factory(Project::class) | 
| 24 | 24 | ->create(['name' => $name]) | 
| 25 | -                ->each(function (Project $project) { | |
| 25 | +                ->each(function(Project $project) { | |
| 26 | 26 | $project->blocks()->save(factory(TextBlock::class)->make()); | 
| 27 | 27 | |
| 28 | 28 | $project->lines()->save(factory(TextLine::class)->make()); | 
| @@ -22,7 +22,7 @@ | ||
| 22 | 22 | |
| 23 | 23 | factory(Page::class) | 
| 24 | 24 | ->create(['name' => $name]) | 
| 25 | -                ->each(function (Page $project) { | |
| 25 | +                ->each(function(Page $project) { | |
| 26 | 26 | $project->blocks()->save(factory(TextBlock::class)->make()); | 
| 27 | 27 | |
| 28 | 28 | $project->lines()->save(factory(TextLine::class)->make()); | 
| @@ -5,7 +5,6 @@ | ||
| 5 | 5 | use Illuminate\Http\Request; | 
| 6 | 6 | use Larafolio\Models\HasContent; | 
| 7 | 7 | use Illuminate\Support\Collection; | 
| 8 | -use Larafolio\Http\Requests\ResourceRequest; | |
| 9 | 8 | |
| 10 | 9 | class ContentCrud | 
| 11 | 10 |  { |