ldc-cocotte/app/Http/Requests/Bo/Shops/UpdateShopRequest.php

26 lines
695 B
PHP
Raw Permalink Normal View History

2026-06-14 21:32:07 +02:00
<?php
declare(strict_types=1);
namespace App\Http\Requests\Bo\Shops;
use App\Cqs\Actions\Shops\UpdateShopInput;
use App\Models\Shop;
2026-06-14 21:32:07 +02:00
class UpdateShopRequest extends StoreShopRequest
{
public function toUpdateShopInput(Shop $shop): UpdateShopInput
{
return new UpdateShopInput(
shop: $shop,
name: $this->string('name')->value(),
address: $this->string('address')->value(),
postcode: $this->string('postcode')->value(),
city: $this->string('city')->value(),
phone: $this->toPhoneNumber(),
coordinates: $this->toCoordinates(),
default: $this->boolean('default'),
);
}
2026-06-14 21:32:07 +02:00
}