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