Example #1
0
 /**
  * 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();
 }
Example #2
0
 /**
  * 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');
 }