Exemple #1
0
 /**
  * reads Project table by unique index
  *  - if not found, emit a not found message.
  *  - if found return the $project record to the caller.
  *
  * @param [in] $text
  * @return record.
  */
 public static function checkIfExists($text)
 {
     $workType = WorkType::where('type', '=', $text)->first();
     if (!is_null($workType)) {
         appGlobals::existsMessage(appGlobals::getWorkTypeTableName(), $workType->type, $workType->id);
     }
     return $workType;
 }
 /**
  * post successful call to the save() method
  * @param $project
  */
 public function created($workType)
 {
     appGlobals::createdMessage(appGlobals::getWorkTypeTableName(), $workType->type, $workType->id);
 }