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