From a714ee4a1051711485ea736c4922faa0f5de9778 Mon Sep 17 00:00:00 2001 From: freekmurze Date: Thu, 6 Jun 2024 11:02:32 +0000 Subject: [PATCH] Fix styling --- database/factories/PostFactory.php | 4 ++-- database/migrations/2024_06_06_121323_create_posts_table.php | 3 +-- database/migrations/2024_06_06_122130_create_tag_tables.php | 3 +-- .../migrations/2024_06_06_122320_create_authors_table.php | 3 +-- .../migrations/2024_06_06_122342_create_author_post_table.php | 3 +-- 5 files changed, 6 insertions(+), 10 deletions(-) diff --git a/database/factories/PostFactory.php b/database/factories/PostFactory.php index 79735608..736e99eb 100644 --- a/database/factories/PostFactory.php +++ b/database/factories/PostFactory.php @@ -4,7 +4,6 @@ use App\Models\Author; use App\Models\Post; -use Closure; use Illuminate\Database\Eloquent\Factories\Factory; class PostFactory extends Factory @@ -28,7 +27,8 @@ public function configure() $tags = ['php', 'laravel', 'javascript']; $post->tags()->attach( - $this->faker->randomElements($tags, faker()->numberBetween(1, 3))); + $this->faker->randomElements($tags, faker()->numberBetween(1, 3)) + ); $post->authors()->saveMany(Author::factory()->create(2)); }); diff --git a/database/migrations/2024_06_06_121323_create_posts_table.php b/database/migrations/2024_06_06_121323_create_posts_table.php index 610ad5b3..edcd34ca 100644 --- a/database/migrations/2024_06_06_121323_create_posts_table.php +++ b/database/migrations/2024_06_06_121323_create_posts_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class () extends Migration { public function up() { Schema::create('posts', function (Blueprint $table) { diff --git a/database/migrations/2024_06_06_122130_create_tag_tables.php b/database/migrations/2024_06_06_122130_create_tag_tables.php index 5925c6cf..6193d6f9 100644 --- a/database/migrations/2024_06_06_122130_create_tag_tables.php +++ b/database/migrations/2024_06_06_122130_create_tag_tables.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class () extends Migration { public function up(): void { Schema::create('tags', function (Blueprint $table) { diff --git a/database/migrations/2024_06_06_122320_create_authors_table.php b/database/migrations/2024_06_06_122320_create_authors_table.php index 1f2972c6..7dc12861 100644 --- a/database/migrations/2024_06_06_122320_create_authors_table.php +++ b/database/migrations/2024_06_06_122320_create_authors_table.php @@ -4,8 +4,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class () extends Migration { public function up() { Schema::create('authors', function (Blueprint $table) { diff --git a/database/migrations/2024_06_06_122342_create_author_post_table.php b/database/migrations/2024_06_06_122342_create_author_post_table.php index 3d621d04..f1d60f8c 100644 --- a/database/migrations/2024_06_06_122342_create_author_post_table.php +++ b/database/migrations/2024_06_06_122342_create_author_post_table.php @@ -6,8 +6,7 @@ use Illuminate\Database\Schema\Blueprint; use Illuminate\Support\Facades\Schema; -return new class extends Migration -{ +return new class () extends Migration { public function up() { Schema::create('author_post', function (Blueprint $table) {