コード例 #1
0
ファイル: BirthdayCommand.php プロジェクト: oimken/sharpzoo
 /**
  * Execute the entity command, and return
  * a file name (if command type is "download"),
  * an array of data for a view (case "view"),
  * or nothing.
  *
  * @param $instanceId
  * @return mixed
  */
 function execute($instanceId)
 {
     $giraffe = $this->repository->find($instanceId);
     $giraffe->age++;
     $giraffe->save();
 }
コード例 #2
0
ファイル: PreviewCommand.php プロジェクト: oimken/sharpzoo
 /**
  * Execute the entity command, and return
  * a file name (if command type is "download"),
  * an array of data for a view (case "view"),
  * or nothing.
  *
  * @param $instanceId
  * @return mixed
  */
 function execute($instanceId)
 {
     $giraffe = $this->repository->find($instanceId);
     return compact('giraffe');
 }