<?php
namespace App\View\Components\Delivery\Deliveryinfo;
use App\Http\Controllers\Delivery\DeliveryController;
use App\Models\Product as ProductModel;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\View\Component;
class Product extends Component {
public DeliveryController $deliveryOptions;
public ProductModel $product;
public Collection $pickupPoints;
public bool $transporteBlanco = true;
public float $transporteBlancoPrice = 0.00;
public bool $physical = true;
public function __construct(ProductModel $product, int $quantity, bool $physical = true) {
$this->product = $product;
$this->physical = $physical;
$this->deliveryOptions = new DeliveryController($product, $quantity);
$this->pickupPoints = get_all_pickup_points();
}
public function render() {
return view('components.delivery.deliveryinfo.product');
}
}
|