Nuekrato
Filament Panel assets not respecting X-Forwarded-Host Header
OK. I further analysed the issue and it seems like a Filament bug:
If I set this in the panel provider:
This seems to be very odd. Laravel respects the X-Forwarded-Host-Header per default when running behind a loadbalancer. I didn't ever experience issues with assets but only using Filament in this case... Any ideas?
4 replies
How to use a custom policy for a custom resource page or disable authorization entirely?
OK. So I can use a custom (non resource page) like described here: https://filamentphp.com/docs/3.x/panels/pages But still use Eloquent Models and Relationships within Form or Table?
14 replies
How to use a custom policy for a custom resource page or disable authorization entirely?
I created a custom page now. I was thinking about a resource page because I resolve a resource (eloquent model) from the magic link in the end and want to show a table with related data to that model. So I thought using a resource page for this would make sense.
14 replies
How to use a custom policy for a custom resource page or disable authorization entirely?
I use the same resource in my "main" app panel that uses the default model policies. I setup an additional "guest" panel for unauthenticated users that can download files from a resource using some kind of magic link. For this I want to check if the URL contains a valid token instead of checking for any model policies (or use a custom policy for that check). For my custom page I don't need any navigation, breadcrumbs or whatsoever.
From my Resource class:
I encrounter a second issue with the
getPages()
-method if I omit the index page for the resource. Somehow the index page seems to be required?
14 replies
Table TextInputColumn Update Other Model
That's because Filament thinks that each form input relates to a model property. You are using a custom identifier (
TextInputColumn::make("score_{$property->id}")
) that does not belong to any model property. This use case is described in the docs:
https://filamentphp.com/docs/3.x/forms/advanced#field-dehydration
Try to use the TextInputColumn with the ->dehydrated(false)
option.7 replies
Form: Adding user-defined pivot data to belongsToMany relationship
For now I would like to go with a RelationManager on the Edit page so I can edit the pivot data later. But I have problems using a repeater:
This is the form in my
AllowedTargetsRelationManager
:
These are typical data in the database of the allowed_file_extensions
column:
["json"]``
default:
[]`5 replies