@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | factory(Author::class, 10)->create() |
| 20 | 20 | ->each(function($author) { |
| 21 | 21 | factory(Book::class, random_int(2, 10))->make() |
| 22 | - ->each(function ($book) use ($author) { |
|
| 22 | + ->each(function($book) use ($author) { |
|
| 23 | 23 | $book->author()->associate($author); |
| 24 | 24 | $book->save(); |
| 25 | 25 | }); |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | |
| 31 | 31 | $bookIds = (new Book)->all()->pluck('id'); |
| 32 | 32 | factory(Store::class, 10)->create() |
| 33 | - ->each(function ($store) use ($bookIds) { |
|
| 33 | + ->each(function($store) use ($bookIds) { |
|
| 34 | 34 | $store->books()->sync(rand($bookIds->min(), $bookIds->max())); |
| 35 | 35 | }); |
| 36 | 36 | cache()->flush(); |
@@ -7,7 +7,7 @@ |
||
| 7 | 7 | { |
| 8 | 8 | public function up() |
| 9 | 9 | { |
| 10 | - Schema::create('book_store', function (Blueprint $table) { |
|
| 10 | + Schema::create('book_store', function(Blueprint $table) { |
|
| 11 | 11 | $table->increments('id'); |
| 12 | 12 | $table->unsignedInteger('book_id'); |
| 13 | 13 | $table->unsignedInteger('store_id'); |
@@ -7,7 +7,7 @@ |
||
| 7 | 7 | { |
| 8 | 8 | public function up() |
| 9 | 9 | { |
| 10 | - Schema::create('profiles', function (Blueprint $table) { |
|
| 10 | + Schema::create('profiles', function(Blueprint $table) { |
|
| 11 | 11 | $table->increments('id'); |
| 12 | 12 | $table->unsignedInteger('author_id'); |
| 13 | 13 | $table->timestamps(); |
@@ -7,7 +7,7 @@ |
||
| 7 | 7 | { |
| 8 | 8 | public function up() |
| 9 | 9 | { |
| 10 | - Schema::create('stores', function (Blueprint $table) { |
|
| 10 | + Schema::create('stores', function(Blueprint $table) { |
|
| 11 | 11 | $table->increments('id'); |
| 12 | 12 | $table->timestamps(); |
| 13 | 13 | |
@@ -3,7 +3,7 @@ |
||
| 3 | 3 | use Faker\Generator as Faker; |
| 4 | 4 | use GeneaLabs\LaravelModelCaching\Tests\Fixtures\Store; |
| 5 | 5 | |
| 6 | -$factory->define(Store::class, function (Faker $faker) { |
|
| 6 | +$factory->define(Store::class, function(Faker $faker) { |
|
| 7 | 7 | return [ |
| 8 | 8 | 'address' => $faker->address, |
| 9 | 9 | 'name' => $faker->company, |
@@ -3,7 +3,7 @@ |
||
| 3 | 3 | use Faker\Generator as Faker; |
| 4 | 4 | use GeneaLabs\LaravelModelCaching\Tests\Fixtures\Profile; |
| 5 | 5 | |
| 6 | -$factory->define(Profile::class, function (Faker $faker) { |
|
| 6 | +$factory->define(Profile::class, function(Faker $faker) { |
|
| 7 | 7 | return [ |
| 8 | 8 | 'first_name' => $faker->firstName, |
| 9 | 9 | 'first_name' => $faker->lastName, |