how to save user_id on create and limit records per user
as the title says , i want to save current logged in user_id when i save a form that will associated with the user
and how to limit user to create one only record , for example a user will create a business profile , i want him to be only able to create only one business profile not as many as he wants
9 Replies
there is a method
mudatedatabeforesave
or something very similar to that. use it to add your logged in useryes this helped a lot
appreciated
getting
Method Filament\Actions\CreateAction::table does not exist.
code :
because it's a table
from namescape
well i found the correct way
i just had to use the pages actions under my resource ( im using v3 )
i'm just having problem limiting user creating more records than one
make a check if user has record
is there any method i can use?
exists on the model for example
well i found that i can just limit by disabling the create action button on any condition