src/Policies/BlockPolicy.php
public function update(User $user, Block $block)
    {

        if ($user->canDo('block.block.update') && $user->isAdmin()) {
            return true;
        }

        return $user->id == $block->user_id;
    }
public function update(User $user, Block $block)
    {

        if ($user->canDo('block.block.update') && $user->isAdmin()) {
            return true;
        }

        return $user->id == $block->user_id;
    }
public function update ( User $ user , Block $ block ) { if ( $ user -> canDo ( 'block.block.update' ) && $ user -> isAdmin ( ) ) { return true ; } return $ user -> id == $ block -> user_id ; }
Determine if the given user can update the given block.

@param User $user
@param Block $block

@return bool
Determine if the given user can update the given block .