コード例 #1
0
 /**
  * Handle the command.
  *
  * @param  CreateFasciaCommand  $command
  * @return void
  */
 public function handle(CreateFasciaCommand $command)
 {
     $fascia_object = Fascie::make($command->nome);
     $fascia = $this->repo->save($fascia_object);
     Event::fire(new FasciaWasCreated($fascia));
     return $fascia;
 }
コード例 #2
0
 /**
  * Handle the command.
  *
  * @param  UpdateFasciaCommand  $command
  * @return void
  */
 public function handle(UpdateFasciaCommand $command)
 {
     $fascia_object = Fascie::edit($command->fascia_id, $command->nome);
     $fascia = $this->repo->save($fascia_object);
     Event::fire(new FasciaWasUpdated($fascia));
     return $fascia;
 }
コード例 #3
0
ファイル: FascieRepo.php プロジェクト: sidis405/ibi
 public function getById($id)
 {
     return Fascie::where('id', $id)->with('prodotti')->first();
 }