Filament

F

Filament

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

Join

CSS not working after fresh install of filament

The login page and the authenticated dashboard page don't load the CSS. This is on a fresh install.
Solution:
Figured out what it was. The ASSET_URL was set and it was causing issues with path resolution I'm assuming.
No description

Problem in table tabs at the custom page

Why my tabs modified query in not applied to the table when the tab is selected? Can someon tell me what is missing?...
Solution:
Finally I solved it by calling $this->resetTable() when the property activeTab changed.

filamentphp slow

Why is my filamentphp slow for 1.5 seconds in any process I do?

create button on wizard in modal, hide until end

I see some documentation on when a create wizard is used within a create page, about how to render the submit button on the last step. I can't find anything about when the wizard is within a modal\slideover. Is it possible to hide the create button until the end ?...
Solution:
Thanks @dissto for making me revisit this at least. I thought this strategy only applied to page creates, and modal creates did not respond the same. In fact, the modal 'Submit' button does appear, but you have to also take action to remove the Create (and Create Another if you are using CreateAction ) from the modal....

Reordering of certain table columns

Hi guys, I was wondering if it is possible to reorder only certain type of records. I have here categories and sub-categories. Now i want to reorder only sub-categories that are within parent category. Goal of this is to be reordered on front navigation. On table we should prevent reorder option for parent category only for sub category and if we drag and drop to other category it should update parent id as well...
No description

Method App\Filament\Pages\RegisterTeam::getCachedSubNavigation does not exist.

I am trying to implement multi-tenancy in my app. After following the steps in the documentation, After login, I received the following error when I was redirected to the 'new' URL

Triggering the create modal of a resource on a custom dashboard widget (blade file)

Hi guys. I'm using the create (and edit) modal in one of my resources. Works like expected. Now, I have a custom widget on my dashboard for this resource and I want users to be able to create a new record right from a model on the dashboard. ...
Solution:
Rubber duck again: found info via Filament Daily about default action. If you use the route to the index of the resource, and pass the name of the action as a query param 'action', it'll be triggered 🙂 https://www.youtube.com/watch?v=B0kO941vh7w...

action button in topbar

Hi! I'm trying to put an action button on the topbar, but nothing is happening when I click on the action. My code is like this: Livewire component: ```...
Solution:
Ah, it’s because the name of the action doesn’t match the output in the blade file. Action::make(‘custom’) {{ $this->customAction }}...

Image preview not loading using FileUpload

The image gets saved when I create a new brand, but when I navigate to 'Lists,' the image is not displayed. This is my APP_URL: APP_URL=http://127.0.0.1:8000. I have already run the command php artisan storage:link. Relevant code in my BrandResource : ```php Tables\Columns\ImageColumn::make('logo')...
Solution:
App url in the env should be the same as the url in the browser. So http://cc.test
No description

contentGrid mobile in table grid

Hello, how to set table 2 column grid in mobile? I use this in function table but don't find breakpoint for mobile...
Solution:
by default On mobile, they will be displayed in 1 column only. try add ```php 'default'=>2...

related select filters

How do I create a related select filters? I want to display the chapters related only to the course ```->filters([ Tables\Filters\SelectFilter::make('course_id') ->relationship('course', 'name')...
Solution:

Cascading/conditional form on polymorphic relations?

I have a model where I created two polymorphic nullable relations to change the 'nature' of an order based on what type of product it is. The company has two main types of products, one in a book-like album form, one as a single print item. Thus the OrderItem model can have either an albumitemable or printitemable morph that adds the respective properties for the album and print variations. Now I'm trying to add this to the orderitem form....

Dispatch Modal doesn't work

Hello everyone, Before I ask my question, I took some time to review previous discussions related to dispatching modals in FilamentPHP. I have a modal in my view that looks like this: ```php...

Automatic Filament ViewAction on Livewire component

I have a Filament table on a Livewire component. I want to be able to jump to the following URL: /users?id=2 and have the component instantiate, but also to have the ViewAction for that specific user to fire. This should be possible, but I just don't know how to go about it....

How to set ->recordAction(null) and ->recordUrl(null) conditionally in custom column?

I am working on a custom column class and view, which should function as a confirmation slider. The issue is that when I drag the slider handle and release outside the slider component, the record row is receiving a click, which triggers the table rows recordAction. I could set ->recordAction(null) and ->recordUrl(null) on my table, but I might not always want to disable row clicks on all tables that use this custom column. So I was wondering if I could somehow conditionally set the recordAction table prop to null when my slider is in the dragging state, to avoid the record click being triggered while interacting with the confirmation slider?...

Action->form() not getting filled when reusing form

Hello, Having a Action on a view page. I want to reuse the form from InvoiceResource as i did, but i want to force fill it with data from the $record, but it doesnt get filled. No errors, just doesnt work; Any ideas on how to handle this?...

How can I show multiple images from a has many from a model with infolist

I'm looking to try and show multiple photos that's attached to my model as a hasMany relationship thank you.

ViewAction::Make() in users list to show transactions of a user

I have a TransactionsResource in which every transaction of a user is logged. Now i want a button to see every transaction of this user in a modal window. How will I implement this?...

translate routes in custom plugin

in my custom plugin, i have the web.php file for the routes ``` Route::group(['middleware' => ['web']], function () { Route::get('/people', [TeamController::class, 'index'])->name('team.index'); Route::get('/people/{slug}', [MemberController::class, 'show'])->name('people.show');...

disableOptionsWhenSelectedInSiblingRepeaterItems fails with multi-select

I have a repeater with a multi-select field, I don't want the same answers to be inputted in different repeater rows. But the method ->disableOptionsWhenSelectedInSiblingRepeaterItems() doesn't seem to work with multi-select. If I remove ->multiple() it works as it should. Am I doing something wrong? Repeater::make('second.questions') ->hiddenLabel() ->minItems(1)...