public function get($id) { $value = Formation::find($id); if (empty($value)) { return array(); } $formation = array("id" => $value->id, "intitule" => $value->intitule, "diplome" => $value->diplome, "date_debut" => $value->date_debut, "date_fin" => $value->date_fin, "mention" => $value->mention, "etablissement" => $value->etablissement); return ['formation' => $formation]; }
/** * Update a model. * * @param array $inputs * @param $id * @return void */ public function update($inputs, $id) { $this->model = Formation::find($id); return $this->save($inputs); }
/** * Find Formation by given id * * @param int $id * * @return \Illuminate\Support\Collection|null|static|Formation */ public function findFormationById($id) { return Formation::find($id); }