Filament

F

Filament

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

Join

Help with opening modal in Page

Hi, I have a Resource Page I made and I'm trying to add a modal to it but I can't seem to open it using $dispatch. It says $dispatch is not defined. Any idea on how to trigger it? I have a <script> tag inside the page where I have my custom js from which I want to trigger the modal. I've used the info in the docs, if I use a button to trigger it like in the first example everything is ok, just javascript dispatching not working.
Solution:
Ok, apparently I solved it myself. Didn't add my scripts inside @script @endscript tag.

Hello,

I have a fresh Install of Laravel/filament/shield and it works perfectly on local machine. When I uploaded to production via Envoyer/Forge, I had to run php artisan shield:install to create the superadmin. I successfully created user. This user logs in and a 403 error appears. Here is snippet of composer.json... "name": "laravel/laravel",...
Solution:
Thats the point, on local envs you can access all panels, but if your app is in prod you need to have that function on the model, otherwise you'll get 403, if you want the user to have access 100% just make it return true

Can i show infolist page without requiring visitor to log in?

Im building a 3 panel app for 3 different user , first for admin, second for mentor , third for intern. its like a job portal without requiring login to see available position, could you be able to do that in filament v3? please guide im new to filament ,thank you...

How to change page number programmatically in a table

So, I'm trying to to open page 38 automatically when opening a resource table. Currently I use the ListRecords class to redirect with a specific page. Unfortunately it's redirecting to a livewire route instead of the intended route. Is there other strategy I can use?...
No description

Action Macro to create Livewire Modals

I created a pretty nice Macro to create single Livewire Component slideover modals without the need for intermediary boiler plate (repetative) Blade views. Anything wrong with this approach? It's working nicely but I'm wondering if not returning a blade view for the modalContent presents any issues. Hopefully this is useful to someone! use Filament\Tables\Actions\Action; use Livewire\Livewire; use Illuminate\Support\HtmlString;...

How to adjust TextInputColumn in a table width

i tried this code but nothing happen Tables\Columns\TextInputColumn::make('quantity') ->label('Qty') ->columnSpan(2),...
No description

multiple filament panels cannot be CRUD in non-default panels

I just created a laravel project with filament v3 with multiple panels to divide users according to level. Everything went well until one day I created 1 resource in one of the panels (not the main panel), the CRUD successfully appeared but when I entered the data it could not, delete it could not, edit it could not. Is there any other setting?

Action on click row table

When clicking on a record in the table, it performs a default action, okay? So, how can I perform one action or another depending on the state of a certain field?

InfoList max width

How can I make my InfoList, which I'm defining in my ModelResource, take the screen whole width, as in MaxWidth::Full ? ```php public static function infolist(Infolist $infolist): Infolist { return $infolist...
Solution:
oh i see idk maybe try ```php...

Implement actions made in livewire in the resource

Hi everyone, I was looking over https://filamentphp.com/docs/3.x/actions/adding-an-action-to-a-livewire-component, and I wanted to know how I could implement my action made with the livewire class, in the actions of the table in the resource...
Solution:
is it possible to do this?

Auto increment field in the table.

Guys, I have a problem here. I need an auto increment field in my table. I tried using BigIncrements, however, as I have an id field that already has a primary key, I was unable to use it. Would there be another way to increase the table? I just can't use the id, I have to create another field for that.

Empty state on Dashboard Table Widget

Hello! I am trying to set emptyState properties on a table widget used on the dashboard, but the override values are not showing. The heading value is showing. I am fairly new to Livewire and Filament. ```...

Filament Panel assets not respecting X-Forwarded-Host Header

I have a very strange issue using Filament in an enterprise/production environment. I defined some additional resources in my PanelProvider: ``` public function panel(Panel $panel): Panel { /* Also tried this but that is not the issue...
No description

Cant sort sidebar navigation items

Hello, I thought that I had created a Filament navigation group correctly, but when I switch from English to any other language, the learning group goes under the settings module. I placed the navigationGroup builder in the AdminPanelProvider within the boot method because if I put the builder in the panel method, the icons disappear when switching languages. How can I fix this?
Solution:
i forgot to remove in resource method which translates the navigation group label and its started to work as i excepted
No description

Hi

nice to meet you

modifyQueryUsing ->join changes $record->id

Building a Dashboard widget to display Team Notes. Works except using join or leftJoin changes $record->id from the original query table to the "joined" table. I want to use the original table id for a link to the record and it changes to the id of the "joined' table . ```return $table...
Solution:
How about this? Basically flipped the logic, and used a whereHas instead of the join to do some of the logic. ``` return $table ->query(Persona::query())...

modal scroll bug - can't select text and jumps to top when clicked.

I have a relation manager displaying a table with an action that will open that record's details in a modal window when clicked. That modal scrolls correctly. However, I'm unable to select any text in the modal window and after scrolling down a bit, when I click, it jumps me to the top of the modal window. I've gone through and removed all the infolist elements so it's a single modal window with a little bit of text. I can't double-click and select any text and it jumps to the top of the modal window when I click....

Summary of all the column values

Hello! I created this text column that shows the total sum of every row I have in the table: ``` Tables\Columns\TextColumn::make('sum_total_row')...

Display Table info with Recursive Relationship

Hi. I'm having hard-time trying to display nested relationship in the table. For example, these 2 Models: Category: ` public function products() {...

datepicker initial date

Should be easy, but I can't find a way to set the landing date of the datepicker, trying: ``` DatePicker::make('uc_dob') ->required() ->label('Date of Birth')...