PLATFORM
  • Tails

    Create websites with TailwindCSS

  • Blocks

    Design blocks for your website

  • Wave

    Start building the next great SAAS

  • Pines

    Alpine & Tailwind UI Library

  • Auth

    Plug'n Play Authentication for Laravel

  • Designer comingsoon

    Create website designs with AI

  • DevBlog comingsoon

    Blog platform for developers

  • Static

    Build a simple static website

  • SaaS Adventure

    21-day program to build a SAAS

Question By
Solved

Creating permissions for custom page

Solved
alejandro-rueda

Apr 4th, 2020 05:44 PM

I tried to create a permission for custom page, but always get 403 error, I did all Create permission, Set Role , but when I try to customize the controller, I don't know where to put this... ** protected function guard() { return Auth::guard(app('VoyagerGuard')); } ** Please help!!!

cookie

Apr 10th, 2020 10:37 PM

You can put your authorize Code directly in your Controller Method. Something like this:

$this->authorize('read', $page);

or:

auth()->user()->can('read', $page);

You know what I mean?

alejandro-rueda

Apr 13th, 2020 07:05 PM

Best Answer

I know what was my error.... In the Controller I wrote

$this->authorize(browse_import); And has to be $this->authorize('browse_import'); The problem was in the Apostrophe

Thanks!!!