SonjaTuro
SonjaTuro
FFilament
Created by SonjaTuro on 2/5/2024 in #❓┊help
Verification Redirect not triggering
Fortify is also installed (for a different use case) and for routes protected by that, the redirect works correctly.
4 replies
FFilament
Created by SonjaTuro on 2/5/2024 in #❓┊help
Verification Redirect not triggering
I didn't do a great job explaining. I'm not referring to the email. I am referring to a logged-in, non-verified user accessing a panel. It should be redirecting to the page for resending verification email, but does not.
4 replies
FFilament
Created by SonjaTuro on 1/20/2024 in #❓┊help
Panel Authentication Route not defined
For those of you wondering, I found that I had accidentally removed RouteServiceProvider from the providers list in app.php (most likely when adding the custom Provider to the filament plugin I was building). The lesson here is, never let me near a keyboard.
3 replies
FFilament
Created by SonjaTuro on 1/20/2024 in #❓┊help
Panel Authentication Route not defined
I just realised if I manually visit /admin/login that it seems to find the route, but then fails with Route [livewire.update] not defined., so must have a issue somewhere.
3 replies
FFilament
Created by SonjaTuro on 1/17/2024 in #❓┊help
Editing a Relationship
It turns out there was a flaw in my thinking about the record relationship: Even though I was peforming a main record edit, the relationship didn't exist yet, and was therefore calling a different function to what I was expecting:
Forms\Components\Section::make()
->relationship('foo')
->schema([...])
->mutateRelationshipDataBeforeCreateUsing(
function (array $data) : array {
$data['subtype'] = 'main';
return $data;
});
Forms\Components\Section::make()
->relationship('foo')
->schema([...])
->mutateRelationshipDataBeforeCreateUsing(
function (array $data) : array {
$data['subtype'] = 'main';
return $data;
});
This is correct approach for a new relation, where I was incorrectly using mutateRelationshipDataBeforeSaveUsing which only works when the relation already exists.
2 replies