@@ -21,7 +21,7 @@ |
||
| 21 | 21 | { |
| 22 | 22 | return [ |
| 23 | 23 | 'body' => fake()->text, |
| 24 | - 'user_id' => function () { |
|
| 24 | + 'user_id' => function() { |
|
| 25 | 25 | return User::factory()->create()->id; |
| 26 | 26 | }, |
| 27 | 27 | 'parent_id' => null, |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | */ |
| 11 | 11 | public function up(): void |
| 12 | 12 | { |
| 13 | - Schema::create('comments', function (Blueprint $table) { |
|
| 13 | + Schema::create('comments', function(Blueprint $table) { |
|
| 14 | 14 | $table->id(); |
| 15 | 15 | $table->foreignId('user_id')->constrained()->onDelete('cascade'); |
| 16 | 16 | $table->foreignId('parent_id')->nullable()->constrained('comments')->onDelete('cascade'); |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | */ |
| 11 | 11 | public function up(): void |
| 12 | 12 | { |
| 13 | - Schema::create('comment_likes', function (Blueprint $table) { |
|
| 13 | + Schema::create('comment_likes', function(Blueprint $table) { |
|
| 14 | 14 | $table->id(); |
| 15 | 15 | $table->foreignId('user_id')->nullable(); |
| 16 | 16 | $table->foreignId('comment_id'); |
@@ -17,7 +17,7 @@ |
||
| 17 | 17 | */ |
| 18 | 18 | public function register(): void |
| 19 | 19 | { |
| 20 | - $this->app->singleton('markdown', function () { |
|
| 20 | + $this->app->singleton('markdown', function() { |
|
| 21 | 21 | $environment = new Environment([ |
| 22 | 22 | 'allow_unsafe_links' => false, |
| 23 | 23 | 'html_input' => 'strip' |
@@ -18,7 +18,7 @@ |
||
| 18 | 18 | */ |
| 19 | 19 | public function register(): void |
| 20 | 20 | { |
| 21 | - $this->app->bind(CommentPolicy::class, function ($app) { |
|
| 21 | + $this->app->bind(CommentPolicy::class, function($app) { |
|
| 22 | 22 | return new CommentPolicy; |
| 23 | 23 | }); |
| 24 | 24 | |
@@ -45,7 +45,7 @@ |
||
| 45 | 45 | ->with('user', 'children.user', 'children.children') |
| 46 | 46 | ->parent() |
| 47 | 47 | ->latest() |
| 48 | - ->paginate(config('commentify.pagination_count',10)); |
|
| 48 | + ->paginate(config('commentify.pagination_count', 10)); |
|
| 49 | 49 | return view('commentify::livewire.comments', [ |
| 50 | 50 | 'comments' => $comments |
| 51 | 51 | ]); |
@@ -8,14 +8,14 @@ |
||
| 8 | 8 | { |
| 9 | 9 | public function up() |
| 10 | 10 | { |
| 11 | - Schema::table('users', function (Blueprint $table) { |
|
| 11 | + Schema::table('users', function(Blueprint $table) { |
|
| 12 | 12 | $table->timestamp('comment_banned_until')->nullable()->after('remember_token'); |
| 13 | 13 | }); |
| 14 | 14 | } |
| 15 | 15 | |
| 16 | 16 | public function down() |
| 17 | 17 | { |
| 18 | - Schema::table('users', function (Blueprint $table) { |
|
| 18 | + Schema::table('users', function(Blueprint $table) { |
|
| 19 | 19 | $table->dropColumn('comment_banned_until'); |
| 20 | 20 | }); |
| 21 | 21 | } |