Proculair B.V.
Programmatically open relationManager View/Edit modal
Goal
I have linked two relationManagers to a Resource (parent).
On the parent I would like to be able to call a function which opens the
View/Edit
action on a specific record in the relationManager.
Motivation
It would be great to "deeplink" to a record in a resource. What I mean by this is that I would like to be able to craft links like "/app/example/12#books-34". This link would open the example resource (id 12)
and trigger the View/Edit
on the book (id 34)
record in the BooksRelationManager.
Question
Is this possible? How could I do this?14 replies
Enable Flare JS error logging
I would like to integrate Flares client side JS error logging (https://flareapp.io/docs/integration/javascript-error-tracking/installation).
The problem is that I cannot link to Vite assets in Filament because that will create a circular dependency.
When doing this Vite will require a manifest which can only be generated after composer is installed which can only happen after the manifest is generated... etc.
How should I solve this?
4 replies
Version 3.2.97 breaks copying form fields when viewing them
Please see the video.
Between version
3.2.96
and 3.2.97
something changed causing the Markdowneditor
field to not be copiable when viewing the resource in a relation manager.
https://github.com/filamentphp/filament/compare/v3.2.96...v3.2.9718 replies
Authorization in RelationManager not allowing to use different model
Hi,
I have a
UserResource
with a TokenRelationManager
.
The tokens use model Laravel\Sanctum\PersonalAccessToken
.
I have the following header action on the relation manager:
As you can see in ->authorize('createToken', User::class)
I want to trigget the createToken
method on the UserPolicy
.
Because of this code in the InteractsWithRecord
trait the model of the relation manager gets prepended as an argument:
How could I trigger the authorization method to use the UserPolicy
?3 replies
ManyToMany Repeater: Call to a member function subscriptionProducts() on null
I have followed this guide: https://filamentphp.com/docs/3.x/forms/fields/repeater#integrating-with-a-belongstomany-eloquent-relationship but unfortunately no luck.
My models:
subscription:
- id
- name
productSubscription
- id
- product_id
- subscription_id
- price
- quantity
product:
- id
- name
- tax
- default_price
9 replies
How to type in the datepicker input box?
For ease of use I would like to be able to type into the datepicker input box instead of having to use the datepicker.
This can be sort of achieved with the following code:
The downside of this approach is that you lose access to the
minDate()
and maxDate()
methods.
Is there a way to have the best of both worlds?5 replies
Modal::closedByClickingAway(false) but allow notifications centre to be closed by clicking away.
Hi,
I've set
Modal::closedByClickingAway(false);
in my service provider. However, I would still like the notification centre to be closable by clicking away.
How would I achieve this?2 replies
How to disable RequestPasswordReset but allow ResetPassword?
I would like to use the built-in ResetPassword class of Filament. However, I do not want my users to be able to request a password reset themselves. They should contact their admin for that, he can then generate a password request which gets sent to the user.
How would I achieve this in Filament? I tried something like this:
->passwordReset(requestAction: null, resetAction: ResetPassword::class)
7 replies