ldc-cocotte/app/Http/Requests/Bo/Shops/UpdateShopRequest.php
Jérémy Munsch d0efb0f527
refactor: update namespaces for actions and queries
Refactored the codebase to change the namespaces of various actions and queries from `App\Actions` to `App\Cqs\Actions` and `App\Queries` to `App\Cqs\Queries`. This restructuring improves organization and clarity in the codebase.
2026-11-10 15:13:26 +01:00

25 lines
695 B
PHP

<?php
declare(strict_types=1);
namespace App\Http\Requests\Bo\Shops;
use App\Cqs\Actions\Shops\UpdateShopInput;
use App\Models\Shop;
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'),
);
}
}