mirror of
https://github.com/robonen/metr.git
synced 2026-03-20 02:44:42 +00:00
Offer filters and user feedback
This commit is contained in:
19
backend/app/Http/Requests/StoreFeedbackRequest.php
Normal file
19
backend/app/Http/Requests/StoreFeedbackRequest.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
class StoreFeedbackRequest extends BaseRequest
|
||||
{
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'comment' => ['required', 'string', 'max:2000'],
|
||||
'rating' => ['required', 'numeric', 'min:1', 'max:5'],
|
||||
];
|
||||
}
|
||||
}
|
||||
19
backend/app/Http/Requests/UpdateFeedbackRequest.php
Normal file
19
backend/app/Http/Requests/UpdateFeedbackRequest.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests;
|
||||
|
||||
class UpdateFeedbackRequest extends BaseRequest
|
||||
{
|
||||
/**
|
||||
* Get the validation rules that apply to the request.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function rules()
|
||||
{
|
||||
return [
|
||||
'comment' => ['string', 'max:2000'],
|
||||
'rating' => ['numeric', 'min:1', 'max:5'],
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user