@@ -11,7 +11,7 @@ |
||
11 | 11 | * |
12 | 12 | * @param array $data Array of data to save. |
13 | 13 | * |
14 | - * @return Project |
|
14 | + * @return Page |
|
15 | 15 | */ |
16 | 16 | public function addPage(array $data) |
17 | 17 | { |
@@ -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 [ |
@@ -53,11 +53,11 @@ discard block |
||
53 | 53 | { |
54 | 54 | parent::boot(); |
55 | 55 | |
56 | - static::creating(function (Model $model) { |
|
56 | + static::creating(function(Model $model) { |
|
57 | 57 | $model->setSlug('name'); |
58 | 58 | }); |
59 | 59 | |
60 | - static::updating(function (Model $model) { |
|
60 | + static::updating(function(Model $model) { |
|
61 | 61 | $model->setSlug('name'); |
62 | 62 | }); |
63 | 63 | } |
@@ -83,7 +83,7 @@ discard block |
||
83 | 83 | |
84 | 84 | if ($group) { |
85 | 85 | return $query->get() |
86 | - ->each(function (Model $model, $key) { |
|
86 | + ->each(function(Model $model, $key) { |
|
87 | 87 | $model->index = $key; |
88 | 88 | }) |
89 | 89 | ->groupBy('type'); |
@@ -150,7 +150,7 @@ discard block |
||
150 | 150 | */ |
151 | 151 | public function scopeOrderRelationship($query, $relationship) |
152 | 152 | { |
153 | - return $query->with([$relationship => function ($query) { |
|
153 | + return $query->with([$relationship => function($query) { |
|
154 | 154 | $query->orderBy('order'); |
155 | 155 | }]); |
156 | 156 | } |