Filament

F

Filament

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

Join

[V4] Select component not rerendering when `multiple` values changes

Hey guys, im currently making a Select field that can accept multiple values if the selected user role have specific permission. The issue is the component doesn't re-render when the selected role value changed. Here's my implementation: ```php Select::make('roles') ->label('Role')...
Solution:
Found a workaround to avoid this issue. I just need to change the field's key to force the component to re-render at cost of need to do the permissions checking on layouts schema level ```php Section::make('Sekolah yang Diawasi') ->icon(Heroicon::AcademicCap)...

Alpine component ax-load-src doesnt fetch in v4

Hello, I've tried to update some package to use v4 and registering alpine component and usage, doesnt fetch the file even tho it exists and it is accessible.
AlpineComponent::make('package', __DIR__ . '/../resources/dist/package.js') // In service provider
AlpineComponent::make('package', __DIR__ . '/../resources/dist/package.js') // In service provider
...
Solution:
The syntax of Async Alpine changed with v2: https://async-alpine.dev/docs/ I know Dan built a compatibility layer for v3. Not sure whether that also works in v4...

Equivalent of `slugAttribute` for resources

Hi all I'm using UUIDs for primary keys, which don't look great for URLs. I've got a pretty_id attribute on my resource models that I'd like to use for URLs. Does anyone know how? You can specify slugAttribute for tenants but I can't find anything similar for resources....
Solution:
Never mind, recordRouteKeyName is what I was looking for

Can't center or edit image size in the RichEditor using Filament V4

Hey guys, i use at the moment Filament v4 and RichEditor for the description product for an ecommerce... So, i try to edit the content but this is not working, for example try to center or align an image and no make the change or update, all the image is in the left side, text can be align but no the image... Can't edit the position or size, i disable the personal theme, and other plugin like Json Media Files, but the problem still... Do you have any idea about this problem? I use: Laravel 12,...
No description

[v4] Colors are less saturated than the tailwind ones

Generally speaking, the filament colors are way less saturated than the tailwind equivalent. Is it by purpose? It's even worse when I try to generate a palette from the hex value: ```php...
No description

How to implement custom layouts using repeaters

I am just getting into using custom tables and outputs and trying to list model relations using repeaters. I can achieve the desired functionality, but the layout is excessively tall, considering the number of rows and data I'm presenting. How do I go about getting a design that is more on one line (like pictured, before and after)
No description

filter header title

Any idea on how to edit the filter header title 'Filters' specific to the resource.
No description

Encode forward slashes in resource `getPages()`

https://laravel.com/docs/12.x/routing#parameters-encoded-forward-slashes The Laravel routing component allows all characters except / to be present within route parameter values. You must explicitly allow / to be part of your placeholder using a where condition regular expression: ```php...
Solution:
The solution was to add the following overwrite to ViewResource.php ```php public static function route(string $path): PageRegistration {...

parseAuthorizationArguments makes it impossible to specify custom policy

I want to specify a custom policy to check against in my ->authorize() in a relation manager. ```php CreateAction::make('upload') ->authorize('createMedia', $this->getOwnerRecord())...
Solution:
We ended up solving this by creating another model which extends media and using that in the relationship.

Is it possible to move the sidebar to the top right ?

Like how would a normal html navbar look like ....
Solution:

how can you get all the data of relational manager table? like fetch all the record in table

i want to fetch all the records in the table and sum the cash_amount but i dont see any function or in any documetation how to fetch it

How can I add a textarea input column to a table?

I've tried
\Filament\Tables\Columns\TextInputColumn::make('notes')
->type('textarea')
\Filament\Tables\Columns\TextInputColumn::make('notes')
->type('textarea')
...
Solution:
Textarea is not a valid input type. It’s a separate html element. To my knowledge there is no textarea column. You’d have to do it as a custom column.

Full Calendar not Showing

i implementing the full calendar by saade when i install to fresh installed project it works but when i implemented in my filament 3.2 the calendar is not showing
No description

Open new items in collapsed repeater

When you have a repeater that's collapsed by default is it possible for newly added items to appear in an open state?

Table individual component css not loading

Hi! I just installed a fresh laravel 12 installation (livewire starter kit), and installed all individual filament components. But when i want to load a table, it does not show the css. ...
Solution:
Dont know what the problem was. But is was fixed by running: php artisan filament:install --scaffold npm install...
No description

Native datepicker setting a value

I have had some weird issue with native datepicker not accepting any input when the value is set with $set() the input remains empty. ...

Any way to get table selected records outside the table function in a custom page

Hi guys, i have a custom page with table and forms, the table is selectable, i need to get the selected records outside of the table function in another function in the custom page. i tried $this->getSelectedTableRecords() but returns empty always, is it even possible?

Exporter : get visible columns only

Hello everyone ! I'm currently trying to export my table, following the doc, everything went well. But now I need to export the visible columns (which are defined by TextColumn->toggleable()) but I am not able to find how I can get those columns in the getColumns() of my CustomExporter.

Relationship not saving on update

```php Forms\Components\Select::make('locations') ->multiple() ->relationship('locations', 'name') ->preload()...
Solution:
Oh, im dump. I was accidentally syncing an empty array somewhere else in my code. Oof

Custom Schema V4

Hello, i have a problem with making new custom Schema in InfoList I want to make new instance of Schema and working ith custom data inside an ```infolist $customSchema = Schema::make($livewire) ->record(User::first()) ->components([...