Custom Validation with relation
I need to replace
replaceWithRelationID
with the parameter ID from the url or the relationship its on.8 Replies
if your slug is like
mypage/{relationID}
and you have a public $relationID
in your Page, you could access it like $this->relationID
.or you use it in a querystring -> info on that can be found here: https://laravel-livewire.com/docs/2.x/rendering-components
Livewire
Rendering Components | Livewire
A full-stack framework for Laravel that takes the pain out of building dynamic UIs.
Its a the normal Filament Formbuilder tho
/admin/company-agreements/9/edit
This has a PriceRelationManager
where i need to get access to the relation id 9
Oh - okay. So just to get you right: url looks like this
/admin/company-agreements/{WHATEVER}/edit
and you wanna access the "WHATEVER"?yea basically, unless there is another way
Maybe you can access the relation where the
price
will be saved on or somethingHave you tried it via
self::getRecord()
?Filament
Relation managers - Resources - Admin Panel - Filament
The elegant TALL stack admin panel for Laravel artisans.
Oh wow, thats it!
Thanks ❤️