From caea5140dce94c3bcd967556e0f7877eb6a558db Mon Sep 17 00:00:00 2001 From: "Daniel S. Billing" Date: Sun, 3 Apr 2022 11:53:38 +0200 Subject: [PATCH 01/21] Installed beyondcode/laravel-comments --- app/Models/Post.php | 2 + app/Models/User.php | 13 +++- composer.json | 1 + composer.lock | 62 ++++++++++++++++++- config/comments.php | 18 ++++++ ...022_04_03_095006_create_comments_table.php | 31 ++++++++++ 6 files changed, 125 insertions(+), 2 deletions(-) create mode 100644 config/comments.php create mode 100644 database/migrations/2022_04_03_095006_create_comments_table.php diff --git a/app/Models/Post.php b/app/Models/Post.php index 3a1f8fe78..9346953a8 100644 --- a/app/Models/Post.php +++ b/app/Models/Post.php @@ -2,6 +2,7 @@ namespace App\Models; +use BeyondCode\Comments\Traits\HasComments; use Spatie\Tags\HasTags; use App\Models\BaseModel; use Illuminate\Support\Str; @@ -21,6 +22,7 @@ class Post extends BaseModel implements Viewable use SoftDeletes; use HasTags; use LogsActivity; + use HasComments; protected $removeViewsOnDelete = true; diff --git a/app/Models/User.php b/app/Models/User.php index 0484f6d8b..cfaa5f92d 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -2,6 +2,7 @@ namespace App\Models; +use BeyondCode\Comments\Contracts\Commentator; use Carbon\Carbon; use DateTimeInterface; use Assada\Achievements\Achiever; @@ -19,7 +20,7 @@ use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Foundation\Auth\User as Authenticatable; -class User extends Authenticatable implements MustVerifyEmail +class User extends Authenticatable implements MustVerifyEmail, Commentator { use HasApiTokens; use HasFactory; @@ -155,4 +156,14 @@ public function twitch() { return $this->hasOne(TwitchAccount::class); } + + /** + * Check if a comment for a specific model needs to be approved. + * @param mixed $model + * @return bool + */ + public function needsCommentApproval($model): bool + { + return false; + } } diff --git a/composer.json b/composer.json index bc281c24d..3bd3e29b2 100644 --- a/composer.json +++ b/composer.json @@ -17,6 +17,7 @@ "anlutro/l4-settings": "^1.0", "assada/laravel-achievements": "^2.3", "betterapp/laravel-db-encrypter": "^1.0", + "beyondcode/laravel-comments": "^1.3", "blade-ui-kit/blade-ui-kit": "^0.3.2", "cyrildewit/eloquent-viewable": "^6.0", "digikraaft/laravel-review-rating": "^2.3", diff --git a/composer.lock b/composer.lock index 80627dd54..c90825248 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "f58677e45f1122208297bdc27b907674", + "content-hash": "647dd8ea276888d097b516248802e0f7", "packages": [ { "name": "akaunting/laravel-language", @@ -425,6 +425,66 @@ }, "time": "2020-08-27T17:17:31+00:00" }, + { + "name": "beyondcode/laravel-comments", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/beyondcode/laravel-comments.git", + "reference": "a49cde825eb447db48b701d64d21cf1f3f467a4d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/beyondcode/laravel-comments/zipball/a49cde825eb447db48b701d64d21cf1f3f467a4d", + "reference": "a49cde825eb447db48b701d64d21cf1f3f467a4d", + "shasum": "" + }, + "require": { + "illuminate/support": "~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0|^8.0|^9.0", + "php": "^7.2.5|^8.0" + }, + "require-dev": { + "orchestra/testbench": "^3.6|^5.0|^6.0|^7.0", + "phpunit/phpunit": "^7.0|^8.0|9.2.*|^9.5.10" + }, + "type": "library", + "extra": { + "laravel": { + "providers": [ + "BeyondCode\\Comments\\CommentsServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "BeyondCode\\Comments\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marcel Pociot", + "email": "marcel@beyondco.de", + "homepage": "https://beyondcode.de", + "role": "Developer" + } + ], + "description": "Add comments to your Laravel application", + "homepage": "https://github.com/beyondcode/laravel-comments", + "keywords": [ + "beyondcode", + "comments", + "laravel-comments" + ], + "support": { + "issues": "https://github.com/beyondcode/laravel-comments/issues", + "source": "https://github.com/beyondcode/laravel-comments/tree/1.3.0" + }, + "time": "2022-02-14T11:24:46+00:00" + }, { "name": "blade-ui-kit/blade-ui-kit", "version": "0.3.3", diff --git a/config/comments.php b/config/comments.php new file mode 100644 index 000000000..9c3c85b74 --- /dev/null +++ b/config/comments.php @@ -0,0 +1,18 @@ + \BeyondCode\Comments\Comment::class, + + /* + * The user model that should be used when associating comments with + * commentators. If null, the default user provider from your + * Laravel authentication configuration will be used. + */ + 'user_model' => null, + +]; \ No newline at end of file diff --git a/database/migrations/2022_04_03_095006_create_comments_table.php b/database/migrations/2022_04_03_095006_create_comments_table.php new file mode 100644 index 000000000..bd3dd7efc --- /dev/null +++ b/database/migrations/2022_04_03_095006_create_comments_table.php @@ -0,0 +1,31 @@ +increments('id'); + $table->morphs('commentable'); + $table->text('comment'); + $table->boolean('is_approved')->default(false); + $table->unsignedBigInteger('user_id')->nullable(); + $table->timestamps(); + }); + } + + /** + * Reverse the migrations. + */ + public function down() + { + Schema::dropIfExists('comments'); + } +} \ No newline at end of file From dbfeb5aa720343fd562f65219f40b3401855294e Mon Sep 17 00:00:00 2001 From: DanielRTRD Date: Sun, 3 Apr 2022 10:01:51 +0000 Subject: [PATCH 02/21] Prettified Code! --- config/comments.php | 4 +--- .../migrations/2022_04_03_095006_create_comments_table.php | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/config/comments.php b/config/comments.php index 9c3c85b74..82498ce53 100644 --- a/config/comments.php +++ b/config/comments.php @@ -1,7 +1,6 @@ null, - -]; \ No newline at end of file +]; diff --git a/database/migrations/2022_04_03_095006_create_comments_table.php b/database/migrations/2022_04_03_095006_create_comments_table.php index bd3dd7efc..2efe49f3d 100644 --- a/database/migrations/2022_04_03_095006_create_comments_table.php +++ b/database/migrations/2022_04_03_095006_create_comments_table.php @@ -28,4 +28,4 @@ public function down() { Schema::dropIfExists('comments'); } -} \ No newline at end of file +} From 1d9c2137a45e3594d11798201cb7b38583a5e98e Mon Sep 17 00:00:00 2001 From: "Daniel S. Billing" Date: Sun, 3 Apr 2022 14:04:39 +0200 Subject: [PATCH 03/21] Removed beyondcode/laravel-comments --- app/Models/Post.php | 2 - app/Models/User.php | 12 +--- composer.json | 1 - composer.lock | 62 +------------------ config/comments.php | 18 ------ ...022_04_03_095006_create_comments_table.php | 31 ---------- 6 files changed, 2 insertions(+), 124 deletions(-) delete mode 100644 config/comments.php delete mode 100644 database/migrations/2022_04_03_095006_create_comments_table.php diff --git a/app/Models/Post.php b/app/Models/Post.php index 9346953a8..3a1f8fe78 100644 --- a/app/Models/Post.php +++ b/app/Models/Post.php @@ -2,7 +2,6 @@ namespace App\Models; -use BeyondCode\Comments\Traits\HasComments; use Spatie\Tags\HasTags; use App\Models\BaseModel; use Illuminate\Support\Str; @@ -22,7 +21,6 @@ class Post extends BaseModel implements Viewable use SoftDeletes; use HasTags; use LogsActivity; - use HasComments; protected $removeViewsOnDelete = true; diff --git a/app/Models/User.php b/app/Models/User.php index cfaa5f92d..8e44c8247 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -2,7 +2,6 @@ namespace App\Models; -use BeyondCode\Comments\Contracts\Commentator; use Carbon\Carbon; use DateTimeInterface; use Assada\Achievements\Achiever; @@ -20,7 +19,7 @@ use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Foundation\Auth\User as Authenticatable; -class User extends Authenticatable implements MustVerifyEmail, Commentator +class User extends Authenticatable implements MustVerifyEmail { use HasApiTokens; use HasFactory; @@ -157,13 +156,4 @@ public function twitch() return $this->hasOne(TwitchAccount::class); } - /** - * Check if a comment for a specific model needs to be approved. - * @param mixed $model - * @return bool - */ - public function needsCommentApproval($model): bool - { - return false; - } } diff --git a/composer.json b/composer.json index 3bd3e29b2..bc281c24d 100644 --- a/composer.json +++ b/composer.json @@ -17,7 +17,6 @@ "anlutro/l4-settings": "^1.0", "assada/laravel-achievements": "^2.3", "betterapp/laravel-db-encrypter": "^1.0", - "beyondcode/laravel-comments": "^1.3", "blade-ui-kit/blade-ui-kit": "^0.3.2", "cyrildewit/eloquent-viewable": "^6.0", "digikraaft/laravel-review-rating": "^2.3", diff --git a/composer.lock b/composer.lock index c90825248..33e17bdf6 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "647dd8ea276888d097b516248802e0f7", + "content-hash": "573a0c0e8df9746718284c5207494690", "packages": [ { "name": "akaunting/laravel-language", @@ -425,66 +425,6 @@ }, "time": "2020-08-27T17:17:31+00:00" }, - { - "name": "beyondcode/laravel-comments", - "version": "1.3.0", - "source": { - "type": "git", - "url": "https://github.com/beyondcode/laravel-comments.git", - "reference": "a49cde825eb447db48b701d64d21cf1f3f467a4d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/beyondcode/laravel-comments/zipball/a49cde825eb447db48b701d64d21cf1f3f467a4d", - "reference": "a49cde825eb447db48b701d64d21cf1f3f467a4d", - "shasum": "" - }, - "require": { - "illuminate/support": "~5.6.0|~5.7.0|~5.8.0|^6.0|^7.0|^8.0|^9.0", - "php": "^7.2.5|^8.0" - }, - "require-dev": { - "orchestra/testbench": "^3.6|^5.0|^6.0|^7.0", - "phpunit/phpunit": "^7.0|^8.0|9.2.*|^9.5.10" - }, - "type": "library", - "extra": { - "laravel": { - "providers": [ - "BeyondCode\\Comments\\CommentsServiceProvider" - ] - } - }, - "autoload": { - "psr-4": { - "BeyondCode\\Comments\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marcel Pociot", - "email": "marcel@beyondco.de", - "homepage": "https://beyondcode.de", - "role": "Developer" - } - ], - "description": "Add comments to your Laravel application", - "homepage": "https://github.com/beyondcode/laravel-comments", - "keywords": [ - "beyondcode", - "comments", - "laravel-comments" - ], - "support": { - "issues": "https://github.com/beyondcode/laravel-comments/issues", - "source": "https://github.com/beyondcode/laravel-comments/tree/1.3.0" - }, - "time": "2022-02-14T11:24:46+00:00" - }, { "name": "blade-ui-kit/blade-ui-kit", "version": "0.3.3", diff --git a/config/comments.php b/config/comments.php deleted file mode 100644 index 9c3c85b74..000000000 --- a/config/comments.php +++ /dev/null @@ -1,18 +0,0 @@ - \BeyondCode\Comments\Comment::class, - - /* - * The user model that should be used when associating comments with - * commentators. If null, the default user provider from your - * Laravel authentication configuration will be used. - */ - 'user_model' => null, - -]; \ No newline at end of file diff --git a/database/migrations/2022_04_03_095006_create_comments_table.php b/database/migrations/2022_04_03_095006_create_comments_table.php deleted file mode 100644 index bd3dd7efc..000000000 --- a/database/migrations/2022_04_03_095006_create_comments_table.php +++ /dev/null @@ -1,31 +0,0 @@ -increments('id'); - $table->morphs('commentable'); - $table->text('comment'); - $table->boolean('is_approved')->default(false); - $table->unsignedBigInteger('user_id')->nullable(); - $table->timestamps(); - }); - } - - /** - * Reverse the migrations. - */ - public function down() - { - Schema::dropIfExists('comments'); - } -} \ No newline at end of file From d3818ddc3d7834194479bc3a66b3922ec89882c4 Mon Sep 17 00:00:00 2001 From: DanielRTRD Date: Sun, 3 Apr 2022 12:57:04 +0000 Subject: [PATCH 04/21] Prettified Code! --- app/Models/User.php | 1 - 1 file changed, 1 deletion(-) diff --git a/app/Models/User.php b/app/Models/User.php index 8e44c8247..0484f6d8b 100644 --- a/app/Models/User.php +++ b/app/Models/User.php @@ -155,5 +155,4 @@ public function twitch() { return $this->hasOne(TwitchAccount::class); } - } From dee0cab6292de83b3fbfe7361eba4956d8593c77 Mon Sep 17 00:00:00 2001 From: "Daniel S. Billing" Date: Sun, 3 Apr 2022 15:34:22 +0200 Subject: [PATCH 05/21] Installed alibayat/laravel-commentable --- composer.json | 1 + composer.lock | 63 ++++++++++++++++++- config/laravel-commentable.php | 19 ++++++ ...022_04_03_125632_create_comments_table.php | 33 ++++++++++ 4 files changed, 115 insertions(+), 1 deletion(-) create mode 100644 config/laravel-commentable.php create mode 100644 database/migrations/2022_04_03_125632_create_comments_table.php diff --git a/composer.json b/composer.json index bc281c24d..1173a73a1 100644 --- a/composer.json +++ b/composer.json @@ -14,6 +14,7 @@ "php": "^8.0.2", "akaunting/laravel-language": "^1.0", "alibayat/laravel-categorizable": "1.0.x-dev", + "alibayat/laravel-commentable": "1.1.x-dev", "anlutro/l4-settings": "^1.0", "assada/laravel-achievements": "^2.3", "betterapp/laravel-db-encrypter": "^1.0", diff --git a/composer.lock b/composer.lock index 33e17bdf6..4e252a9ba 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "573a0c0e8df9746718284c5207494690", + "content-hash": "2029c69db19a91296c85c5515b8df093", "packages": [ { "name": "akaunting/laravel-language", @@ -129,6 +129,66 @@ }, "time": "2022-03-02T19:16:11+00:00" }, + { + "name": "alibayat/laravel-commentable", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/AliBayat/Laravel-Commentable.git", + "reference": "17e905a6f8663d2e601bb42e715c90af6e5b3ac0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/AliBayat/Laravel-Commentable/zipball/17e905a6f8663d2e601bb42e715c90af6e5b3ac0", + "reference": "17e905a6f8663d2e601bb42e715c90af6e5b3ac0", + "shasum": "" + }, + "require": { + "illuminate/database": "^7.0|^8.0|^9.0", + "illuminate/support": "^7.0|^8.0|^9.0", + "kalnoy/nestedset": "^6.0", + "php": "^7.2|^8.0|^8.1" + }, + "default-branch": true, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + }, + "laravel": { + "providers": [ + "AliBayat\\LaravelCommentable\\CommentableServiceProvider" + ] + } + }, + "autoload": { + "psr-4": { + "AliBayat\\LaravelCommentable\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ali Bayat", + "email": "ali.bayat@live.com" + } + ], + "description": "Implementing a Comment system for Laravel's Eloquent models.", + "keywords": [ + "Laravel Commentable", + "eloquent", + "laravel", + "laravel-commentable" + ], + "support": { + "issues": "https://github.com/AliBayat/Laravel-Commentable/issues", + "source": "https://github.com/AliBayat/Laravel-Commentable/tree/master" + }, + "time": "2022-03-20T11:49:26+00:00" + }, { "name": "anlutro/l4-settings", "version": "v1.1.1", @@ -15366,6 +15426,7 @@ "minimum-stability": "dev", "stability-flags": { "alibayat/laravel-categorizable": 20, + "alibayat/laravel-commentable": 20, "graham-campbell/markdown": 20, "restcord/restcord": 20 }, diff --git a/config/laravel-commentable.php b/config/laravel-commentable.php new file mode 100644 index 000000000..1164c14b1 --- /dev/null +++ b/config/laravel-commentable.php @@ -0,0 +1,19 @@ + \AliBayat\LaravelCommentable\Comment::class, + +]; diff --git a/database/migrations/2022_04_03_125632_create_comments_table.php b/database/migrations/2022_04_03_125632_create_comments_table.php new file mode 100644 index 000000000..985a8b437 --- /dev/null +++ b/database/migrations/2022_04_03_125632_create_comments_table.php @@ -0,0 +1,33 @@ +increments('id'); + $table->string('title')->nullable(); + $table->boolean('active')->default(false); + $table->text('body'); + $table->morphs('commentable'); + $table->morphs('creator'); + NestedSet::columns($table); + $table->timestamps(); + }); + } + + public function down() + { + Schema::dropIfExists('comments'); + } +} From b56c63c91d8e10c4fa818759d8306a167df529b3 Mon Sep 17 00:00:00 2001 From: "Daniel S. Billing" Date: Sun, 3 Apr 2022 15:34:32 +0200 Subject: [PATCH 06/21] Setup alibayat/laravel-commentable --- app/Models/Post.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/Models/Post.php b/app/Models/Post.php index 3a1f8fe78..17dd1d337 100644 --- a/app/Models/Post.php +++ b/app/Models/Post.php @@ -2,6 +2,7 @@ namespace App\Models; +use AliBayat\LaravelCommentable\Commentable; use Spatie\Tags\HasTags; use App\Models\BaseModel; use Illuminate\Support\Str; @@ -21,6 +22,7 @@ class Post extends BaseModel implements Viewable use SoftDeletes; use HasTags; use LogsActivity; + use Commentable; protected $removeViewsOnDelete = true; From 3f9f818e34f79d9a0dad1707ac28e970601f2476 Mon Sep 17 00:00:00 2001 From: "Daniel S. Billing" Date: Sun, 3 Apr 2022 15:35:17 +0200 Subject: [PATCH 07/21] Added CommentSection --- app/Http/Livewire/Blog/CommentSection.php | 36 +++++++++++++++ .../livewire/blog/comment-section.blade.php | 44 +++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 app/Http/Livewire/Blog/CommentSection.php create mode 100644 resources/views/livewire/blog/comment-section.blade.php diff --git a/app/Http/Livewire/Blog/CommentSection.php b/app/Http/Livewire/Blog/CommentSection.php new file mode 100644 index 000000000..4d67a4978 --- /dev/null +++ b/app/Http/Livewire/Blog/CommentSection.php @@ -0,0 +1,36 @@ + 'update', + ]; + + public function mount(int|Post $post) + { + if($post instanceof Post) { + $this->post = $post; + } else { + $this->post = Post::find($post); + } + $this->comments = $this->post->comments; + } + + public function update() + { + $this->comments = $this->post->comments; + } + + public function render() + { + return view('livewire.blog.comment-section'); + } +} diff --git a/resources/views/livewire/blog/comment-section.blade.php b/resources/views/livewire/blog/comment-section.blade.php new file mode 100644 index 000000000..3528babf4 --- /dev/null +++ b/resources/views/livewire/blog/comment-section.blade.php @@ -0,0 +1,44 @@ +
+ +
+

@lang('Comments') ({{ $post->commentCount() }})

+ +
+ +
+ @forelse($comments as $comment) +
+
+ +
+
+ {{ $comment->creator->username }} {{ $comment->created_at->isoFormat('LLL') }} +

+ {{ $comment->body }} +

+ + @if($comment->hasChildren()) +

@lang('Replies')

+
+ @foreach($comment->children as $comment) +
+
+ +
+
+ {{ $comment->creator->username }} {{ $comment->created_at->isoFormat('LLL') }} +

+ {{ $comment->body }} +

+
+
+ @endforeach +
+ @endif +
+
+ @empty +

No comments yet.

+ @endforelse +
+
From 81b9a96989a8d5839ee7fd6ad2df0df8e036b7f8 Mon Sep 17 00:00:00 2001 From: "Daniel S. Billing" Date: Sun, 3 Apr 2022 15:35:29 +0200 Subject: [PATCH 08/21] Added CommentModal --- app/Http/Livewire/CommentModal.php | 48 +++++++++++++++++++ .../views/livewire/comment-modal.blade.php | 20 ++++++++ 2 files changed, 68 insertions(+) create mode 100644 app/Http/Livewire/CommentModal.php create mode 100644 resources/views/livewire/comment-modal.blade.php diff --git a/app/Http/Livewire/CommentModal.php b/app/Http/Livewire/CommentModal.php new file mode 100644 index 000000000..6b9b88b03 --- /dev/null +++ b/app/Http/Livewire/CommentModal.php @@ -0,0 +1,48 @@ +post = Post::find($post); + $this->body = ''; + $this->parentComment = $parentComment; + } + + public function save() + { + $this->validate([ + 'body' => ['required', 'string', 'min:10', 'max:255'], + ]); + + $commentData = [ + 'title' => null, + 'body' => $this->body + ]; + + if ($this->parentComment) { + $this->parentComment = \AliBayat\LaravelCommentable\Comment::find($this->parentComment); + } + + $this->post->comment($commentData, auth()->user(), $this->parentComment); + + $this->emit('commentAdded'); + + $this->closeModal(); + } + + public function render() + { + return view('livewire.comment-modal'); + } +} diff --git a/resources/views/livewire/comment-modal.blade.php b/resources/views/livewire/comment-modal.blade.php new file mode 100644 index 000000000..289d89dc3 --- /dev/null +++ b/resources/views/livewire/comment-modal.blade.php @@ -0,0 +1,20 @@ + + + @lang('Leave a comment') + + + + + @lang('Min characters'): 10 · @lang('Max characters'): 255 + + + + + + {{ __('Save') }} + + + {{ __('Cancel') }} + + + From 5a572b55f8c652c242cb93c7d864081c71ecbc59 Mon Sep 17 00:00:00 2001 From: "Daniel S. Billing" Date: Sun, 3 Apr 2022 15:43:25 +0200 Subject: [PATCH 09/21] Add livewire to guest layout --- resources/views/layouts/guest.blade.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/resources/views/layouts/guest.blade.php b/resources/views/layouts/guest.blade.php index d7d2df21d..a160a239d 100644 --- a/resources/views/layouts/guest.blade.php +++ b/resources/views/layouts/guest.blade.php @@ -14,6 +14,7 @@ + @livewireStyles @@ -45,7 +46,8 @@ function $buo_f(){ {{ $slot }} - @livewireScripts + @livewireScripts + @livewire('livewire-ui-modal')