ConnorHowell
A calculated column in the table
You should either use the sortable method to customise the way it performs the query, or you should consider using a virtual column on the table https://filamentphp.com/docs/3.x/tables/columns/getting-started#sorting
3 replies
Uploading new image to a prefilled spatie media file upload not working in custom page with forms
Could you share the code you're using for the form? It sounds like it's not setup to allow multiple files? https://filamentphp.com/docs/3.x/forms/fields/file-upload#uploading-multiple-files
3 replies
How to add code into main Head in all pages in Filamentphp?
There's 2 ways, you can either register a javascript file on the panel: https://filamentphp.com/docs/3.x/panels/configuration#registering-assets-for-a-panel
Or you can register a render hook https://filamentphp.com/docs/3.x/support/render-hooks#registering-render-hooks, you'd want PanelsRenderHook::HEAD_END or PanelsRenderHook::HEAD_START
3 replies
Login and registration API
https://filamentphp.com/docs/3.x/panels/users#customizing-the-authentication-features - Read this section on how you would go about customising the auth features. The example in the docs is on the EditProfile page but you can apply this to both Login & Register pages.
8 replies
Custom table columns per table tab
So the filament version of a lens would be using filter tabs on the "ListRecords" page class: https://filamentphp.com/docs/3.x/panels/resources/listing-records#using-tabs-to-filter-the-records
On your columns you can use a callback in hidden() to inject $livewire which will give you the instance of ListRecords, you can then use that to check the current tab.
Let's say you have the following on the ListRecords page:
On a table you could do the following to make the 'active' column only show on the all tab:
6 replies
Select option Concat
In options you can return any array/collection so you just need to write your own logic in there to get an array of keys/values as you would any other way in PHP/Laravel.
You could use mapWithKeys to achieve this, something like this would work:
10 replies
Disable global search from topbar
https://filamentphp.com/docs/3.x/panels/resources/global-search#disabling-global-search - You can disable it globally per panel like so
10 replies