/** * Handle the command. * * @param UpdateStaffInfoCommand $command * @return void */ public function handle(UpdateStaffInfoCommand $command) { $staff_info_object = StaffInfo::edit($command->staff_info_id, $command->women, $command->men, $command->age); $staff_info = $this->repo->save($staff_info_object); Event::fire(new StaffInfoWasUpdated($staff_info)); return $staff_info; }
public function getById($id) { return StaffInfo::where('id', $id)->first(); }