Esempio n. 1
0
 /**
  * Execute the job.
  *
  * @return void
  */
 public function handle(PackageRepositoryInterface $package, ShoppingCart $cart)
 {
     $selectedPackage = $package->find($this->package_id);
     $newItem = ['id' => $selectedPackage->id, 'name' => $selectedPackage->name, 'qty' => (int) $this->quantity, 'price' => $selectedPackage->adult_price, 'options' => ['child_quantity' => $this->child_quantity, 'date' => $this->date, 'date_submit' => $this->date_submit, 'time' => $this->time ?: '', 'package' => $selectedPackage]];
     $cart->add($newItem);
     return $newItem;
 }