2026-06-14 21:32:07 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
|
|
namespace App\Http\Requests\Bo\Shops;
|
|
|
|
|
|
2026-11-10 14:28:00 +01:00
|
|
|
use App\Cqs\Actions\Shops\UpdateShopInput;
|
2026-10-01 11:25:05 +02:00
|
|
|
use App\Models\Shop;
|
|
|
|
|
|
2026-06-14 21:32:07 +02:00
|
|
|
class UpdateShopRequest extends StoreShopRequest
|
|
|
|
|
{
|
2026-10-01 11:25:05 +02:00
|
|
|
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
|
|
|
}
|