nova-assertions icon indicating copy to clipboard operation
nova-assertions copied to clipboard

Assertions for Add/Attach/Detach Relations

Open calvinps opened this issue 5 years ago • 2 comments

Is there a way to test if you can add/attach/detach relationships? Nova provides a way to authorize editing relationships on a resource: https://nova.laravel.com/docs/2.0/resources/authorization.html#relationships

If not, maybe this would make a good addition to the Policies assertions (e.g. assertCanAdd, assertCanAttach, assertCanDetach)?

calvinps avatar Sep 26 '19 19:09 calvinps

Yeah this would be great, assertion of the pivot fields on add and edit attachment would also be handy

stevelacey avatar Dec 01 '19 03:12 stevelacey

PRs welcome

dillingham avatar Dec 02 '19 14:12 dillingham