Filament

F

Filament

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

Join

Accessing admin page

Hey! Hello! In Filament, is it possible to access the admin interface not at the usual URL: project.com/admin, but at admin.project.com? Thanks in advance for your answers!...

Issue while upgrading from v3 to v4

Any solution for this ? Method App\Filament\Resources\SubmissionResource\Pages\EditSubmission::mountFormComponentAction does not exist....
Solution:
$livewire->mountAction('addNoteOnStatusUpdated', context: [
'schemaComponent' => 'form.yourField', //field you use registerActions
]);
$livewire->mountAction('addNoteOnStatusUpdated', context: [
'schemaComponent' => 'form.yourField', //field you use registerActions
]);
...
No description

Big Builder Block - Page Builder

Hey! I built a big builder block for building Funnels for my SaaS Tool. Each funnel consists of Steps (separate table). Each Step consists of Sections and the Sections contain Blocks (Headline, Text, Cards, Video, Image.. you name it)...

Multi-tenancy: How do I change redirect route for team to use subdomain instead of query.

When I try to access example.test/app while not logged in I am redirected to login. Then when I login I am redirected to: example.test/app/new-app I want it to redirect me to correct route which is: new-app.example.test/app...
No description

Filament\FilamentManager::getUserName(): Return value must be of type string, null returned

After upgrading to v4.0.4 I got this error... No other changes were made. I am running in "Guest Mode" with no auth middleware or login routes, etc... Reverting back to 4.0.3 fixes the problem....
Solution:
Fixed in 4.0.5. Thanks crew!

Why are my enum labels not being used in my table column?

I've got this enum class ```php namespace App\Enums; ...
Solution:
what about $casts instead of method? ```php protected $casts = [ 'type' => ApprovalType::class,...

Summarizer On Custom Table

Hi all I am struggling with a custom table on filament v4. I need a SUM at the bottom fo the table much like we do on non customer tables. However I am getting the following error App\Filament\Clusters\Reports\Pages\InternetClients::getTableSummarySelectedState(): Argument #1 ($query) must be of type Illuminate\Database\Eloquent\Builder, null given, called in /Users/davidwhicker/Development/Herd/misce-filament/storage/framework/views/bcf55eaeae8fe2b8d0b210a2bb5b1d19.php on line 161 Here is my code: ...
Solution:
Maybe its a bit late but i posted a quick fix in here: https://github.com/filamentphp/filament/issues/17286...

File Upload Preview Issue

What I am trying to do: I want to display uploaded images in Filament’s FileUpload field clearly (not blurred or pixelated) when editing a record. What I did: ...
No description

Why is livewire dispatch not triggering the function?

I have a custom field in Filament called custom-repeater.blade.php contains this script, after rearranging the order ```js...

Action authorize() method not working

I have an action on a model called claim that is related to updaing a document. My action below uses a method on the DocumentPolicy to tell whether a user can upload a document. It no longer works like in v3, as the method downloadRequiredDocument never gets called, and I can not see the button etc....

Weird Importer

The CSV file has 169179 lines, with duplicates (169030 without), after importing it with ``` public static function getChunkSize(): int {...
No description

npm run build creates public/build/assets/app-XXX.css but page loads css/filament/filament/app.css

I am getting crazy about it. npm run build adds classes that I use in my app such as text-primary-500, but css/filament/filament/app.css don't have them. Ran out of ideas. ...

Eror Cursor pagination

when i added this code ```protected function paginateTableQuery(Builder $query): CursorPaginator { return $query->cursorPaginate( (int) (($this->getTableRecordsPerPage() === 'all')...
No description

File Upload ERR_ACCESS_DENIED

Hey guys, i got a Problem uploading my Files. I get the ERROR ERR_ACCESS_DENIED. Here is my function: ```...

Auto Select Issue in Select Option

when I try to auto select of cityids and it working well but it can also select value after auto selected.so that can cause duplicate Select::make('country_id') ->label('Country') ->reactive()...

Testing page footer actions in v4

I'm attempting to call a page footer action in a test for a resource page. Typically, in an EditRecord page for example, we would have these footer actions: ```php protected function getFormActions(): array { return [...

Pagination Cursor not working

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 {...

Replicate - but display form instead of saving directly.

I want to duplicate a model instance and some required fields should be ignored. In this case the standard replicate action fails because the confirm modal only shows a confirm button and by pressing it the duplicated cannot be saved in the database because of the ignored non-nullable columns. I found this v3 thread but the solution does not work: https://discord.com/channels/883083792112300104/1245204314645987399 After analyzing the core code I found that the solution as simple as adding a $this->schema() . So here is my working custom action class that displays my form inside the replicate modal and allows to fill out the not replicated, required fields:...

Using Icons Inside RichContentRenderer

Is it possible to use icons inside the RichContentRenderer? My component looks like this: ```php...