Skip to content

Especific resource is not show #3728

Answered by crynobone
IgorDePaula asked this question in Q&A
Discussion options

You must be logged in to vote
<?php

namespace App\Policies;

use App\Models\Ambit;
use App\Models\User;
use Illuminate\Auth\Access\HandlesAuthorization;

class AmbitPolicy
{
    use HandlesAuthorization;

    /**
     * Determine whether the user can view any models.
     *
     * @param  \App\Models\User  $user
     * @return \Illuminate\Auth\Access\Response|bool
     */
    public function viewAny(User $user)
    {
        return true;
    }

    /**
     * Determine whether the user can view the model.
     *
     * @param  \App\Models\User  $user
     * @param  \App\Models\Ambit  $ambit
     * @return \Illuminate\Auth\Access\Response|bool
     */
    public function view(User $user, Ambit $ambit)
    {
        re…

Replies: 7 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@IgorDePaula
Comment options

Comment options

You must be logged in to vote
1 reply
@IgorDePaula
Comment options

Comment options

You must be logged in to vote
1 reply
@IgorDePaula
Comment options

Answer selected by IgorDePaula
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #3727 on February 03, 2022 20:06.