Esi
Esi
FFilament
Created by Carlinhos on 10/29/2024 in #❓┊help
How can I use Laravel ENUM in the Filement table?
You should do something like this:
enum OrderPaymentMethod: string implements HasColor, HasIcon, HasLabel
{
case Card = 'card';

case Cash = 'cash';

public function getLabel(): string
{
return match ($this) {
self::Card => 'Credit card',
self::Cash => 'Cash on delivery',
};
}

public function getColor(): string | array | null
{
return match ($this) {
self::Card => 'success',
self::Cash => 'warning',
};
}

public function getIcon(): ?string
{
return match ($this) {
self::Card => 'heroicon-m-credit-card',
self::Cash => 'heroicon-o-wallet',
};
}
}
enum OrderPaymentMethod: string implements HasColor, HasIcon, HasLabel
{
case Card = 'card';

case Cash = 'cash';

public function getLabel(): string
{
return match ($this) {
self::Card => 'Credit card',
self::Cash => 'Cash on delivery',
};
}

public function getColor(): string | array | null
{
return match ($this) {
self::Card => 'success',
self::Cash => 'warning',
};
}

public function getIcon(): ?string
{
return match ($this) {
self::Card => 'heroicon-m-credit-card',
self::Cash => 'heroicon-o-wallet',
};
}
}
and then in the table ->options(OrderPaymentMethod::class)
6 replies
FFilament
Created by Esi on 10/17/2024 in #❓┊help
filament-fabricator with spatie-laravel-translatable-plugin
No description
3 replies
FFilament
Created by Esi on 9/25/2023 in #❓┊help
Hierarchy tables
I also tried using this package staudenmeir/laravel-adjacency-list which does the heavy job but I can't render the records as they should on Table builder since I don't know how to make a recursive table to loop through children items
38 replies
FFilament
Created by Esi on 9/25/2023 in #❓┊help
Hierarchy tables
I am doing the same as the proposed but it's complicated to keep the sequence number on edit and delete. It requires to update the hole table sequence numbers always to keep the order
38 replies
FFilament
Created by Esi on 9/25/2023 in #❓┊help
Hierarchy tables
I just want to list the table records in that format, regarding the routes I am keeping the standard one
38 replies
FFilament
Created by pocket.racer on 9/7/2023 in #❓┊help
How to increase Register Page White box width?
You can try with scss using the @apply to add classes like this:
.fi-simple-main {
@apply relative sm:max-w-sm #{!important};
max-width: 416px !important;
}
.fi-simple-main {
@apply relative sm:max-w-sm #{!important};
max-width: 416px !important;
}
If you have overridden the file make sure the path is correct, for example for login it should be resources/views/vendor/filament-panels/pages/auth/login.blade.php
11 replies
FFilament
Created by Esi on 9/20/2023 in #❓┊help
Sidebar: sort items and groups
Thanks a lot
16 replies
FFilament
Created by Esi on 9/20/2023 in #❓┊help
Sidebar: sort items and groups
Even if you register custom navigation you can't sort navigation items and navigation groups between them.
16 replies
FFilament
Created by Esi on 9/20/2023 in #❓┊help
Sidebar: sort items and groups
Is any way to change the order with js on frontend
16 replies
FFilament
Created by Esi on 9/20/2023 in #❓┊help
Sidebar: sort items and groups
I need them in this order: Dashboard Blog Posts Customers Users Shop Products Settings
16 replies
FFilament
Created by Esi on 9/20/2023 in #❓┊help
Sidebar: sort items and groups
I have a specific design where I need to have the navigation items in specific order. Till now I don't see any solution how to sort them like in the screenshot
16 replies
FFilament
Created by Marco Mapelli on 9/20/2023 in #❓┊help
Logo in login page and after logged in
You can use two different logos by using @guest and @auth
7 replies