Esempio n. 1
0
 /**
  * Simpan Departement
  * (New Departement)
  *
  * @return mixed
  */
 public function save()
 {
     $this->dept->name = Input::get('name');
     $this->dept->info = Input::get('info');
     $this->dept->uuid = uniqid('New_');
     $this->dept->createby_id = Auth::user()->id;
     $this->dept->lastupdateby_id = Auth::user()->id;
     $this->dept->created_at = new Carbon();
     $this->dept->updated_at = new Carbon();
     $saved = $this->dept->save() ? true : false;
     return Response::json(array('success' => $saved, 'results' => $this->dept->toArray()))->setCallback();
 }