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