Filament

F

Filament

Filament is a collection of beautiful full-stack components for Laravel.You can get help using it on our Discord.

Join

is 2 cores 2gb server enough for filament with 3 differenet panels each for admin, mentor, intern?

Im really in the rush right now casue i got an internship for building a internship management program for around 3 month, im consedering using filament for rapid development , but i have concerns regarding the server requirement , can 2 cores 2gb ram server handle around 400+ request in peak hour such in the morning and evening? thanks alot, im really really a newbie in this field

Infolist not properly aligned

Sorry if I am missing something something but I'm trying to get my server stats and quick actions sections under each other. This is the code for the view. https://pastes.dev/vqOl7cOc1A...

How to allow the password field to be red too and have error message in login?

This is the default login of Filament, I've just edited the lang there. is it possible both field to be red?
No description

How to Effectively Implement Mentions System in Filament RichEditor Field?

I'm trying to implement a mentions system in a Filament RichEditor field, but I'm facing some challenges. My goal is to allow users to mention other users using "@" followed by the username, with these mentions converting into clickable links. So far, I've tried: Creating a custom component extending RichEditor. Using TributeJS to implement the mentions functionality....

FileUpload component - issue with delete uploaded file

I have a simple file upload component in my [Model]Resource: ```php return $form->schema([ TextInput::make('title'),...
No description

Multi Tenancy with one to many polymorphic relationship.

I got the error. I can't create the category at the filament panel
The model [App\Models\Tenant] does not have a relationship named [categories]. You can change the relationship being used by setting it as the [$tenantRelationshipName] static property on the [App\Filament\Resources\CategoryResource] resource class.
The model [App\Models\Tenant] does not have a relationship named [categories]. You can change the relationship being used by setting it as the [$tenantRelationshipName] static property on the [App\Filament\Resources\CategoryResource] resource class.
```php...

Select Field empty on Edit Page

Hi, I have an edit page that can only be accessed by super_admin, there is a select field that queries the data that the user has created. But when the super_admin wants to edit the data, the data in the select disappears even though it has been recorded in the database. Is this a bug or did I write the code wrong on the query? ```...
No description

Navigation buttons

Hello all, I have Organization class resource which has a relation manager with OrganizationRequests class, now in view org page I show the requests table, I want to add a button in the top and when user click on it, it scroll down to requests table, how to do that?...
No description

dashboard widget looks weird

hi just followed the getting started tutorial but im getting the chart widget like this image, is that normal? how i can fix it to show correct design? thank you
Solution:
https://github.com/filamentphp/filament/releases/tag/v3.2.114 Lock Livewire to max v3.5.6 due to bug introduced #14315....
No description

Add unit testing on ToggleColumn with using Pest

I have this code i want to update enable action in table by writing unit tests ```it('can disabled loan limit', function() { $loanLimit = LoanLimit::factory()->create(['status' => true]); livewire(LoanLimitResource\Pages\ListLoanLimits::class)...
No description

Found a bug

Inside a resource table i have put an Action (ViewPayoutAction) which shows a blade file with a livewire component in it. Inside the livewire component i have put a filament table widget with an action inside of it. Inside the action modal i have put extra modal footeractions. ...
No description

getEloquentQuery() in the RelationManager

I don't think that when a resource is being queried through a RelationManager, it the query via:
getEloquentQuery
getEloquentQuery
I've tried placing the same method in the ResourceRelationsManager to no avail. Any ideas?...
Solution:
This will work. ```return $table ->modifyQueryUsing(fn (Builder $query) => $query->where('is_active', true)) ->columns([ // ... ]);...

Existing data not showing in the select box.

When I click on a record to edit it, the select boxes do not show the data which should be there. This is my code ```php return $form ->schema([...

ImageColumn shows an ? with 404 not found error on console

Hello, Im trying to show an image on a relationmanager table. The image is stored on the public disk on the filesystem and ive already linked my public storage with artisan storage:link, but when i go to my resource, the image doesnt appear and in my browser console i get the following error: Failed to load resource: the server responded with a status of 404 (Not Found) with the url http://127.0.0.1:8000/admin/products/17/localhost/storage/filename.jpg. Im using the following code block to show the image: return $table ->recordTitleAttribute('image_url') ->columns([ ImageColumn::make('image_url')->disk('public')->width(200)->height(200) ])...
Solution:
Well i solved it, it was not finding the image as the APP_URL on my .env was localhost and on the browser it was on 127.0.0.1 and i simply thought localhost was some placeholder for the ip

Using filters in a custom page

I'm trying to build a custom page (sort of a report), which will use a date range filter, and then fetch the data from various resources to display as per the selected date range. Since it requires custom formatting, so using Table Builder or Info List is not suitable. Now, while I'm able to show the filters form by adding FilterAction to getHeaderActions() and using HasFiltersAction trait, I'm unable to figure out which method should I use to fetch and update the data on page as per the selected date range. Could someone please help on this?...
Solution:
Figured it out. Had to override getViewData()

Problems in duplicate query detected at debugbar

Here's a table action I'm using, with some conditions to be visible Action::make('verifikasi') ->icon('heroicon-o-magnifying-glass') ->visible(function ($record) {...

Email attachments (FileUpload) not working

I have the following simple email form: ```php public static function form(Form $form): Form { return $form...
No description

Colorchange on Stateupdate not working in Infolist

Hi - I got an infolist that is filled via the state-function. When I update the state via an action like this: ``` ->action(function () { $state = $this->infolist->getState(); $state['connection']['status'] = 'online'; $this->infolist->state($state);...

Modal: Livewire component

How would I open a livewire modal on the test button? This way it doesn't open my modal
No description

Download a generated file with Action button

Is there a simple way to download a file by pressing an action button? My code already prepare a proper response with the correct mime type and body but the request is not handled correctly by the browser. If I cannot use a direct download I need to use a URL but I need to send POST inputs to the request as I'm generating a PDF preview of the form....