I have several purchasable models that have a many to many relation ship with the customer model. As such I am using a BelongsToMany relationship.
BelongsToMany::make(__('Courses'), 'courses', Course::class)
->sortable()
->searchable(),
To ensure a sepeate checkout process cannot be bypassed, I need to disable the attach action of the relationship:
How can I prevent the course from being attached to the user?
2
Answers
try doing this
Override this method in the nova resource.
Also, found this in official documentation, if you want to try out
https://nova.laravel.com/docs/resources/authorization.html#authorizing-attaching-detaching