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.
25 lines
695 B
PHP
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'),
|
|
);
|
|
}
|
|
}
|