F
Filament4mo ago
cvc

Create Macro that uses Get Owner Record for Actions

Hi all i reuse this a lot on Actions
->visible(//only visible if $record organization is the same as the current user's organization
function () {
return $this->getOwnerRecord()->organizations->contains(organization());
}
)
->visible(//only visible if $record organization is the same as the current user's organization
function () {
return $this->getOwnerRecord()->organizations->contains(organization());
}
)
How can i use it on the AppServiceProvider as the getOwnerRecord method is not there?
0 Replies
No replies yetBe the first to reply to this messageJoin