crud
crud copied to clipboard
Pass correct models to policy methods when listing resources
Closes https://github.com/orchidsoftware/crud/issues/76
Hi @giant-robot Can you please add a simple test for this?
@tabuna I am seeing an issue with the test.
When the policy allows the user to access the list screen (viewAny
returns true
), the system attempts to fetch data from the roles
table and PHPUnit subsequently fails because the table is not there.
I can't think of a way to test that the policy methods are indeed passed the right arguments without allowing access to the list screen and adding platform tables to the test environment seems like a deeper change than the scope of this PR.
How would you like to proceed?