1
0
mirror of https://github.com/robonen/metr.git synced 2026-03-20 19:04:43 +00:00
Files
metr/backend/app/Http/Requests/StoreOrderRequest.php
2022-05-28 22:55:36 +07:00

22 lines
537 B
PHP

<?php
namespace App\Http\Requests;
class StoreOrderRequest extends BaseRequest
{
/**
* Get the validation rules that apply to the request.
*
* @return array<string, mixed>
*/
public function rules(): array
{
return [
'offer_id' => ['required', 'numeric', 'exists:offers,id'],
'user_id' => ['required', 'numeric', 'exists:users,id'],
'price' => ['required', 'numeric', 'min:0.1'],
'discount' => ['required', 'numeric', 'min:0'],
];
}
}