Answer Overflow Logo
Change Theme
Search Answer Overflow
GitHub
Add Your Server
Login
Home
Popular
Topics
Gaming
Programming
jlarm
Posts
Comments
F
Filament
•
Created by jlarm on 10/16/2023 in
#❓┊help
Add Current User to Pivot on save.
Fixed by adding the following to the "CreateDealership" page:
protected function
afterCreate
()
: void
{
$this
->
record
->
users
()
->
attach
(
auth
()
->
user
()
->
id);
}
protected function
afterCreate
()
: void
{
$this
->
record
->
users
()
->
attach
(
auth
()
->
user
()
->
id);
}
3 replies