Level 1
Oct 14, 2015
1
Level 12
Policy without passing through Model
I've been learning about Policies and implementing them into my application. I understand I do can thing like
$user->can('update', $post);
But what if I didn't want to pass through a model. Say I'm trying to find out if a user is allowed to upload an WAV audio file. In my app it's based on the users package $user->package so all I would want to do is $user->can('uploadWav'); and then in the Policy check the $package.
If I do $user->can('uploadWav'); then I assume it doesn't know which policy to check?
Please or to participate in this conversation.