Need Notifications to be centered and bigger. Getting error doing what docs say.

Hello. I need to change the look and position of the notifications saying: Created. Deleted. Saved correctly. I have followed the official docs here : https://filamentphp.com/docs/2.x/notifications/customizing-notifications I have put this code in app\Providers\AppServiceProvider.php
public function boot(): void
{
Notification::configureUsing(function (Notification $notification): void {
$notification->view('notifications.notification');
});
}
public function boot(): void
{
Notification::configureUsing(function (Notification $notification): void {
$notification->view('notifications.notification');
});
}
I have also created the blade view file at resources\views\notifications\notification.blade.php
<x-notifications::notification
:notification="$notification"
class="flex w-80 rounded-lg transition duration-200"
x-transition:enter-start="opacity-0"
x-transition:leave-end="opacity-0"
>
<h4>
{{ $getTitle() }}
</h4>

<p>
{{ $getDate() }}
</p>

<p>
{{ $getBody() }}
</p>

<span x-on:click="close">
Close
</span>
</x-notifications::notification>
<x-notifications::notification
:notification="$notification"
class="flex w-80 rounded-lg transition duration-200"
x-transition:enter-start="opacity-0"
x-transition:leave-end="opacity-0"
>
<h4>
{{ $getTitle() }}
</h4>

<p>
{{ $getDate() }}
</p>

<p>
{{ $getBody() }}
</p>

<span x-on:click="close">
Close
</span>
</x-notifications::notification>
But I am getting an error: Unable to locate a class or view for component [notifications::notification]. It takes quite a few seconds thinking before thowing that error. Any ideas of what might be happening or what I am doing wrong. This is the first time I need to customize the notifications duration, size, etc. Tks.
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server