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 a record.
  */
 public static function checkIfExists($text)
 {
     $project = Project::where('name', '=', $text)->first();
     if (!is_null($project)) {
         appGlobals::existsMessage(appGlobals::getProjectTableName(), $project->name, $project->id);
     }
     return $project;
 }
 /**
  * post successful call to the save() method
  * @param $project
  */
 public function created($project)
 {
     appGlobals::createdMessage(appGlobals::getProjectTableName(), $project->name, $project->id);
 }