Jefry
is it possible to create a notification in alpinejs without it going to the server?
<div class="background-light900_dark200 relative max-w-4xl overflow-hidden rounded-xl border border-gray-200 px-5 py-10 shadow-sm dark:border-none"
x-data="{
vote(type) {
if (!$wire.userId) {
return new FilamentNotification()
.title('Please sign in')
.body('You need to sign in to vote')
.icon('heroicon-o-exclamation-circle')
.iconColor('warning')
.send()
}
// vote logic here
}
}">
6 replies
Can't login on multiple panels
I was using my default admin panel , i then created a new one called cashiers, whrn i try to log in it says credentials not found but when i try to login on the default one it does log in. Does it have to do with the user resource not being part of the cashier panel?
5 replies
How to validate two fields combined are unique
Here i need to validate the name and size_id are unique, i could do it in laravel but how could i in filamentphp. Thanks for answering
schema([
TextInput::make('name')->label('Nombre')->required(),
TextInput::make('purchase_price')->label('Precio de compra')->required()->numeric(),
TextInput::make('sale_price')->label('Precio de venta')->required()->numeric(),
TextInput::make('filled_weight')->label('Peso lleno')->required()->numeric(),
TextInput::make('empty_weight')->label('Peso vacío')->required()->numeric(),
Select::make('category_id')->relationship(name: 'category', titleAttribute: 'name')->label('Categoría')->native(false)->searchable()->preload(),
Select::make('size_id')->relationship(name: 'size', titleAttribute: 'name')->label('Tamaño')->native(false)->searchable()->preload()->required(),
Checkbox::make('sales_in_vip')->label('Se vende en el VIP')
])
7 replies