canDo('cross_trade.order_vehicle.approve')) { return true; } return false; } /** * Determine if the given user can approve the given order_vehicle. * * @param Authenticatable $user * * @return bool */ public function submit(Authenticatable $user, OrderVehicle $order_vehicle) { if ($user->canDo('cross_trade.order_vehicle.submit')) { return true; } return false; } /** * Determine if the given user can approve the given order_vehicle. * * @param Authenticatable $user * * @return bool */ public function publish(Authenticatable $user, OrderVehicle $order_vehicle) { if ($user->canDo('cross_trade.order_vehicle.publish')) { return true; } return false; } /** * Determine if the given user can approve the given order_vehicle. * * @param Authenticatable $user * * @return bool */ public function unpublish(Authenticatable $user, OrderVehicle $order_vehicle) { if ($user->canDo('cross_trade.order_vehicle.unpublish')) { return true; } return false; } /** * Determine if the given user can approve the given order_vehicle. * * @param Authenticatable $user * * @return bool */ public function archive(Authenticatable $user, OrderVehicle $order_vehicle) { if ($user->canDo('cross_trade.order_vehicle.archive')) { return true; } return false; } /** * Determine if the given user can approve the given order_vehicle. * * @param Authenticatable $user * * @return bool */ public function unarchive(Authenticatable $user, OrderVehicle $order_vehicle) { if ($user->canDo('cross_trade.order_vehicle.unarchive')) { return true; } return false; } /** * Determine if the given user can approve the given order_vehicle. * * @param Authenticatable $user * * @return bool */ public function reject(Authenticatable $user, OrderVehicle $order_vehicle) { if ($user->canDo('cross_trade.order_vehicle.reject')) { return true; } return false; } }