Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assertions for Add/Attach/Detach Relations #6

Open
calvinps opened this issue Sep 26, 2019 · 2 comments
Open

Assertions for Add/Attach/Detach Relations #6

calvinps opened this issue Sep 26, 2019 · 2 comments

Comments

@calvinps
Copy link

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)?

@stevelacey
Copy link
Contributor

stevelacey commented Dec 1, 2019

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

@dillingham
Copy link
Owner

PRs welcome

This was referenced Apr 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants