1 year ago

with out declaration in authservice provider is it work policy authorization ?

Posted 1 year ago by towhid

is it work if any function call or metthod call ?

in projectpolicy file

   public function view(User $user, Project $project)
        return  $project->user_id == $user->id;

in projectController file

 public function view(Project $project)

        $this->authorize('view', $project);
        return view('project.view')->withProject($project);

Please sign in or create an account to participate in this conversation.