mirror of
https://github.com/robonen/metr.git
synced 2026-03-20 02:44:42 +00:00
Offer and order controllers
This commit is contained in:
29
backend/app/Http/Requests/UpdateOfferRequest.php
Normal file
29
backend/app/Http/Requests/UpdateOfferRequest.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
use App\Enums\OrderTypesEnum;
|
||||
use Illuminate\Validation\Rules\Enum;
|
||||
|
||||
class UpdateOfferRequest extends BaseRequest
|
||||
{
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'owner_id' => ['numeric', 'exists:users,id'],
|
||||
'name' => ['string'],
|
||||
'type' => [new Enum(OrderTypesEnum::class)],
|
||||
'price' => ['numeric'],
|
||||
'rooms' => ['numeric'],
|
||||
'yandex_mark' => ['string'],
|
||||
'location' => ['string'],
|
||||
'description' => ['string'],
|
||||
'is_group' => ['boolean'],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user