Filament

F

Filament

A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire

Join

Animated Sidebar

I like to use the collapsable sidebar on desktop but now it snaps from one state to another but I want to make the transition animated but I can't get anything working, can somebody help me?

Filament v3: Adding overflow/scrollbar to forms

Hey folks 👋 I’m trying to add a scrollbar inside a Filament v3 form section, but I can’t figure out how to do it since the form builder doesn’t let me directly apply custom CSS like overflow-y-auto. I am using a GRID.
No description

How do you set the relationship name, when creating nested records?

I've got a model EntityAlias nested in Entity. I've also got a AliasesRelationManager. Everything works except the "Create". When I attempt to create a record, not only do I have to manually select the entity it's for (even though I've come from that page), but when trying to save, it's guessing the relationship name. I need to call ParentResourceRegistration::relationship() but I cannot for the life me figure out how to....

Notification transparency

In Filament v4, the success notification seems to have had the transparency cranked right up which makes it really hard to read. See image. How can I alter the opacity in my theme file while preserving the colour?...
No description

Pagination Cursor not working in Filament Tables

Pagination Cursor not working why Filament\Tables\ConcernsCan\PaginateRecords:
public function getTablePage(): int
{
return $this->getPage($this->getTablePaginationPageName());
}
public function getTablePage(): int
{
return $this->getPage($this->getTablePaginationPageName());
}
It expects page to be of type int, but paginateCursor is a string. I don't know if I'm doing something wrong, but it seems like the typing should also have a string type. Making this change to Filament\Tables\ConcernsCan\PaginateRecords and the contract Filament\Tables\Contracts\HasTable directly in the vendor package works perfectly. To get the error, just include: ```public static function table(Table $table): Table {...

curator error

i keep getting this error when i try to attach or insert in image in curator Brick\Math\BigNumber::isGreaterThanOrEqualTo(): Argument #1 ($that) must be of type Brick\Math\BigNumber|string|int|float, null given, called in D:\My Files\Workspace\my_projects\inventorymanagement\vendor\laravel\framework\src\Illuminate\Validation\Concerns\ValidatesAttributes.php on line 1649...

Override the default action for a CRUD

Hello everyone, I have a problem in Filament. I want to use the Command Pattern. This pattern allows you to create a separate class for each action, such as CRUD operations.
It is amazing for maintainability and refactoring.
...

Htmlable label causes "Alpine Expression Error: Invalid or unexpected token"

``` TextColumn::macro('abbr', function (string $abbr) { $label = $this->getLabel(); $html = "<abbr class="underline decoration-dotted cursor-help">{$label}</abbr>";...
No description

defaultImageUrl not worcking

defaultImageUrl not working what to do?
No description

Tenancy Model Scoping Best Practices

With multi-tenancy implemented, what's the best practice to scope Eloquent models to a Tenant Is this the correct approach? I don't see any documentation on creating models/migrations with multi-tenancy and any opinionated advice on this would be great. ```php...

admin user - trying to install filament 4 and create admin user

Hi - been wanting to have play with all the latest updates, have run into a silly issue - my users table I like to change so users always have a first name and last name for use later, when I try php artisan make:filament-user I’m unable to create a user obviously as it doesn’t match database values required, first name last name Tried vendor publish but not found what I need as yet - know I’ve done this before as dev work using filament I could add filament admin user after fresh migration and seeded users for testing all with first names and last names ? For production fine to set using domain but for dev work I want an admin user to access panels to build What have I missed ? Thanks in advance...
Solution:
use tinker php artisan tinker ```bash...

Exporting Image's + CSV/Excel using Exporter

HI All, I have a CMS Posts resource - having fields like name, title, description, image. I have created the exported for this - Now i can download the csv or excel but i also want to download the uploaded images too. Can you please let me know the best way to handle this - as i want to export both csv/excel data + images in a zip - and it should like follow the default queue system too....

Infolist - belongsToMany collection.count not rendering?

Hi all< I have 2 eloguent models with a many to many relations. I know the relationship is set up correctly in eloquent as a RepeatableEntry filed renders the individual members of the collection properly. I also want to output the count of the items in the collection with: TextEntry::make('declines.count')...

Validation Rules only on create

Is it possible to have validation rules only apply in the create step but not on later editing?
Solution:
use operation ```php TextInput::make('title') ->required(fn (string $operation) => $operation === 'create')...

Best practice for having multiple panels with single authentication

Hi there, After reading some issues on GitHub I was wondering what the current way is to have multiple panels but single authentication entry and redirect to same login page. I have 2 panels:...

Wizard with multiple (success) buttons

I have a wizard (inside a modal) for creating a resource. Is there a way to define more than one modalSubmitAction? What I’d like to achieve is to have, at the end of the process, two buttons: for example, “Create” and “Create another”. Or a "Create" and "Create and Send" Button....

->fill() does not work with SpatieMediaLibraryFileUpload

I am trying to implement a form where users can come back and edit their answers or upload new files but whatever I try to fill the SpatieMediaLibraryFileUpload with the data fails. If I provide uuid, path, url it doesn't give any error but also doesn't populate the field. If I were to give UploadedFile, Media or MediaCollection it gives an error with Filament\Forms\Components\SpatieMediaLibraryFileUpload::{closure:Filament\Forms\Components\SpatieMediaLibraryFileUpload::setUp():90}(): Argument #2 ($file) must be of type string, array given this error originates from closure used in$this->getUploadedFileUsing when the function setUp has been called. It's driving me insane. I have also tried to just use relationship but still the same problem! ...
Solution:
For any one having similar problems here is the solution 1. Define your model in the mount() function 2. Because lazy loading is disabled for Media model, add ->load('media') to the model you are fetching 3. Explicitly define ->model($this->yourModel) in the SpatieMediaLibraryFileUpload 4. Fill the field using the uuid of the media you're trying to use...
No description

v4 Page number pagination

Is the click on page number type of pagination still a thing on v4 (example pic I found from v3)? I can only get previous/next buttons to work. I tried ->paginationMode(PaginationMode::Default), but it's still just previous and next buttons. Maybe I'm missing something. 🤔...
Solution:
No description

RBAC in Multi Tenant system

Hi Everyone, I'm creating an Multi Tenant system and i want to implement RBAC - can you please help me to suggest what would be the best way to implement this - If you have any working example or a link to a github repo please help to share. Thanks...