App\Http\Controllers\Laralum\BlogsController::checkRole PHP Метод

checkRole() публичный Метод

public checkRole ( $blog_id, $role_id )
    public function checkRole($blog_id, $role_id)
    {
        Laralum::permissionToAccess('laralum.blogs.access');
        # This function returns true if the specified user is found in the specified role and false if not
        if (Blog_Role::whereBlog_idAndRole_id($blog_id, $role_id)->first()) {
            return true;
        } else {
            return false;
        }
    }