Filament

F

Filament

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

Join Server
Jjepewsykes1/26/2024

richeditor not send value to db

im trying to save richeditor field to db this is my code RichEditor::make('alasan')...
No description
Pprapok011/26/2024

TypeError: Cannot convert undefined or null to object

how to fix it? if i click on action button, twice(create and edit) i got the error.
No description
BBabiute🍎🐍1/26/2024

Trying to figure out where this string comes from

When translating the application to pt_BR, these two strings are not being translated in the subNavigation's Resource. I'm trying to identify where they come from to submit a correction PR, but I couldn't identify it. I know, i can do
protected static ?string $navigationLabel = 'whatever';
protected static ?string $navigationLabel = 'whatever';
, but, somehow, looks like a missing translations. ...
Solution:
Strings come from the component name.... ```php namespace Filament\Pages;...
No description
BBasketMC1/26/2024

Relationship Repeater in EditRecord saves before beforeSave?

What I am trying to do: Create a group of changes when someone creates or updates records in Filament. Some of the elements are repeaters with relationships. What I did: I'm able to do this properly in the CreateRecord because all of the creating happens between beforeCreate and afterCreate. However, in the EditRecord I tried to use the beforeSave and afterSave, but the relationship repeater ends up being saved within the $data = $this->form->getState()...
Jjw1/26/2024

Toggle visibility on Form Field is slow

Hello, Firstly thanks for a great product, really enjoying using it. As per the attached video, when I'm toggling the visibility of a form field using Livewire, it is taking around 1 second for the UI to respond. ...
Solution:
Hi again, it seems the speed delay was from using the WAMP stack on windows. I moved my development to 'Laravel Sail' and the livewire round trip reduced to about 60ms.
NNathan1/26/2024

How to handle Error in beforeReplicaSaved

I need to sync with an external API when a new product is created. How can i return an error and stop the replication in the beforeReplicaSaved method if the API call failed? I tried: ```PHP Notification::make()...
LLea1/26/2024

Can't dispatch inside a Filament component in my blade

Hello, i'm trying to use $dispatch to download file, I'm using Spatie Media Library, with S3 as my disk. My function download() simply doesn't run after I click the download button using @click="$dispatch('download-document')"...
Aashattack1/26/2024

Sometimes Vendor CSS (and JS) are not found after installing

Hi everyone, Sometimes when installing a new plugin I get a net:ERR_ABORTED 404 (Not Found) message in my console for said plugins css/js. It occurred for both JS and CSS with filament-database-schedule (#husam-database-schedule) and recently it occurred when I pulled filament-slim-scrollbar....
Ggmgarrison1/26/2024

Widget error - unable to find component

I used the command line to create a stats-overview widget, Enrollment. I did not create it tied to any resource and it's for the admin panel, the only panel I have. As expected, app/Filament/Widgets/Enrollment.php was created. I manually changed the file and class name to EnrollmentWidget (to avoid a name conflict with the Model), changed the getHeadersWidgets function in the Dashboard page, and emptied out the auto-discover and widget arrays in the config file. But when I load the Dashboard, I get an error: Unable to find component: [app.filament.widgets.enrollment-widget] Is this expecting a view I have not provided? Is it connected to the originally-named widget?...
Solution:
Or register it with the panel through ->widgets()
Mmarty62361/25/2024

permission Resource

Hi, I have installed the Spatie Roles Permissions package and I would like to ask how to set the permissions for e.g. project manager only for certain mdels?
JJJSanders1/25/2024

Access record data

Is it possible to access the data of a record before returning the form? ```php public static function form(Form $form): Form {...
NNoor1/25/2024

Css !Important

Just a quick question if we cannot use !important too much , and if your css code doesn't work without !important then what solution do we have to make your code work. Otherwise there would be alot !important.
Iigorclauss1/25/2024

Persist toggled Columns over Logins

Hello. Is there a way to persist toggled columns over logins? ...
Ssadiqgoni131/25/2024

Add background to Login Page

Please how can i change and add background image to background of LOGIN page
Solution:
i am just lost on where to implement it
Create a custom theme and add it there....
Ttinkypinky1/25/2024

Repeater with Fileupload doesn't update previews on using $set

Hi all. I am using a Filament repeater with 3 field. 2 Textinputs and 1 Fileupload. I am using another fileupload to fetch multiple images then make a repeater field based on number of images so that description can be added to each of the image. When I use $set to dynamically update my repeater, the data is there but no preview is shown by file upload it just shows original UI to select a file. Is there a better way to do this?...
DDGINX1/25/2024

Skip Import when model is existing

Hello is it possible to skip a row during import when model is already existing?
XXavi1/25/2024

Model observer doesn't works on relation manager

I have a created observer function on a model but on Relation Manager inside resource, it doesn't fired when i create a new relation. It may be possible? Thanks...
Hharps1/25/2024

Export action on custom page

Is it possible to add a an export action to a custom page. My use case is that I want a page with cards on it, each card has an action to run a predefined export. One is actually XML so will need to be custom but the rest are csv. After the export is created I also want to be able to mark each record as exported, I already have a field in my model exported_at....
No description
SSchilly1/25/2024

dynamic Use $class;

I am working on making a plugin / module / whatever you want to call it... I am curious to know if it is possible to dynamically call a model name based off a config value. EG: config value is: USER_MODEL = "\App\Model\User" and in the model class I want to be able to dynamically set that for the:...
Ttg1/25/2024

Must <foreign_model>_id be fillable to save it on resource creation?

I have two models, Opportunity -> belongsTo -> Company. The opportunities table has a company_id field which is * not nullable* to ensure data integrity. The Opportunity model has a relationship company. ```php class Opportunity extends Model {...