public function view(UserPolicy $user, Faq $faq)
    {
        if ($user->canDo('faq.faq.view') && $user->isAdmin()) {
            return true;
        }

        return $faq->user_id == user_id() && $faq->user_type == user_type();
    }
public function view(UserPolicy $user, Faq $faq)
    {
        if ($user->canDo('faq.faq.view') && $user->isAdmin()) {
            return true;
        }

        return $faq->user_id == user_id() && $faq->user_type == user_type();
    }
public function view ( UserPolicy $ user , Faq $ faq ) { if ( $ user -> canDo ( 'faq.faq.view' ) && $ user -> isAdmin ( ) ) { return true ; } return $ faq -> user_id == user_id ( ) && $ faq -> user_type == user_type ( ) ; }
Determine if the given user can view the faq.

@param UserPolicy $user
@param Faq $faq

@return bool
Determine if the given user can view the faq .