Filament

F

Filament

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

Join

Typed static property Filament\Resources\Pages\Page::$resource must not be accessed before...

I was trying to introduce a service to set up an additional field on the client profile called 'proxy_phone' and I introduced this error I cannot seem to get around. I am new to Filament and PHP. I will attach the PHP files I've modified in this process in hopes of isolating where I've introduced this error, as well as include the error and its stack trace as well.

RichEditor not showing image, it is uploading to /storage/public/attachments

Hi, as you guys can see the image is there and is uploaded to the directory. http://localhost:8000/storage/attachments/Ycnj9tMN6MfX3zvHCCV3GHXyQjFnpdC4vFsCE5Pr.jpg this is the image url, tho im getting an 404 Not Found Code: ...
Solution:
Did you run php artisan storage:link?
No description

Roles and permissions

What I want is the ability to assign roles and permisions to users so that they can only access certain parts of the app. What would be the recommended way to do this ? I was looking into Shield plugin but I'm curious what would be a recommended way to do this. Thank you.

Select Element - Without model

Hey, I'm trying to do the following: Use a filament dropdown that is searchable but without referencing a model. The example I am using is for a county selection in the UK. I have an enum of Counties. The field is shown inside its own field on a page that is a livewire component. The field works okay without the searchable but when this is added it's not populating the dropdown. ...

Custom page messing up sidebar

I made a custom page where I built a custom Livewire component. I also added the app.css file as I needed the tailwind-classes. ```php @vite(['resources/css/app.css']) ...
No description

Long text table

I've a table and i have a field that contains a long text. Is it possibile to add something like a "sub row" that columspan all the column for a row? Any solutions? thanks...

SpatieMediaLibraryFileUpload::make('x')->label(__("x"))->multiple()

SpatieMediaLibraryFileUpload::make('x')->label(__("x"))->multiple() ->collection('x')->acceptedFileTypes(['application/pdf']), has issue while use ->multiple() ...

FilePond modal position

I've a single form that only holds an avatar file upload, like this: ```php public function avatarForm(Form $form): Form {...
Solution:
Huraay! I've fixed it myself by putting the form outside of the header image: ```html <form wire:submit.prevent="submit" x-cloak x-on:form-processing-started="isUploadingFile = true"...
No description

Add Filter to an Page

Hello, I Hope you can help me out getting something to work. I have a page that will show widgets for all the target_name found in the settings. As part of the settings the user can set a tag as well. I want to add a filter form on the page show it will only show the widgets matching the tag (or all when none are selected). So far I have not been able to set it to show up. I did read that filters etc are only supported on basepage and dashboard. Is this correct, or is there a way to show a filter form on a normal page? See attched the page. ...

url redirect not working

I am trying to create a redirect to a view page but this isn't working in laravel filament 3. ```->actions([ Action::make('View Order')...

table widget with InteractsWithPageFilters

Hi everyone, I'm trying to match my widget table filter with the InteractsWithPageFilters trait, thanks

Multiple add actions on repeater

I have to make something like "bulk add", where a user will be able to upload a spreadsheet to add items to a repeater. The normal add action should still be present, so it needs to be a new action. Is there a way to add custom actions to the overall repeater itself, not each item?...

Application load failure on Safari but OK on Chrome

Hi all, bit of an odd one this. I developed originally using the php server and all was good. I then wanted to make the app accessible to a wider audience for evaluation and so I configured apache and setup SSL etc. The issue occurs on logging in: If I login to the app on Safari using the php server (port 8000) all OK. If I login to the app on Safari using apache (443) I get an error. If I login to the app on Chrome using apache (443) all OK....
Solution:
OK. Interesting! Worked in private mode.

Background Image On Simple Page

hi all , i create custom Simple Page. My question is how to add image as background at the behind of the form ?
No description

Is there a way to programmatically add item to a repeater?

I have a section with a repeater. The section also has a header action. When the action button is click, im doing something in the background and then create an item in the repeater. Could someone point me to the right direction. TIA!...

How to create a cluster for an individual record?

Hey I'm new to filament 3 so would love your help with this. Basically I have a client resource that has a lot of other related resources related to it (forms, sites, logos, etc). I want to basically create a cluster of these related resources for each individual client such that when a user clicks on a client on the dashboard, they see a sub nav for that client with links to these individual resources filtered for that client (overview, forms, sites, logos, etc). Does it make senes? Semantically cluster seems like the right fit but I just don't know how to create a cluster for individual client record like that....

How to add `created_at` column with `sortable()` to `BelongsToMany` RelationManager correctly

I have a RelationManager with a BelongsToMany relationship, and both the pivot table and the relationship table has a created_at column. I try to add the column to the table like this: ```php public function table(Table $table): Table { return $table...
Solution:
You could try: ```php ->sortable(query: function (Builder $query, string $direction): Builder { return $query...

Remove or change jquery cdn link

In filament, I want to change <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> into other cdn link because link above is not working for my country. Can I download jquery script file or change cdn link? Thanks in advance....

How to Display Related Model Data on the Edit Page?

I have two models: User and DetailUser. I want to display the name from DetailUser on the edit page. However, I'm unable to display it using
detailUser.name
detailUser.name
. Why is this happening? Model User.php ``` public function userDetail()...

"make:filament-widget" is not defined

I'm successfully using Filament notifications and UI components already in my project. When i try to install widget and try to create new widget as mention in the Doc I'm getting this error.