public function update(UserPolicy $user, PriceList $price_list)
    {
        if ($user->canDo('pricelist.price_list.edit') && $user->isAdmin()) {
            return true;
        }

        return $price_list->user_id == user_id() && $price_list->user_type == user_type();
    }
public function update(UserPolicy $user, PriceList $price_list)
    {
        if ($user->canDo('pricelist.price_list.edit') && $user->isAdmin()) {
            return true;
        }

        return $price_list->user_id == user_id() && $price_list->user_type == user_type();
    }
public function update ( UserPolicy $ user , PriceList $ price_list ) { if ( $ user -> canDo ( 'pricelist.price_list.edit' ) && $ user -> isAdmin ( ) ) { return true ; } return $ price_list -> user_id == user_id ( ) && $ price_list -> user_type == user_type ( ) ; }
Determine if the given user can update the given price_list.

@param UserPolicy $user
@param PriceList $price_list

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