Some checks failed
tests / ci (pull_request) Has been cancelled
- Add FeedbackController to handle feedback submissions and management. - Create Feedback model and migration for feedbacks table. - Introduce FeedbackStatus and FeedbackType enums for better type handling. - Implement FeedbackService for business logic related to feedback. - Create FeedbackRequest for validation of feedback data. - Add Tiptap rich text editor for feedback message input. - Develop frontend components for displaying and managing feedback. - Add routes for feedback management in web.php. - Create utility types for feedback in TypeScript. - Update app-sidebar to include feedback navigation.
25 lines
546 B
PHP
25 lines
546 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests;
|
|
|
|
use App\Enums\FeedbackType;
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
use Illuminate\Validation\Rule;
|
|
|
|
class FeedbackRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'type' => ['required', 'string', Rule::in(array_column(FeedbackType::cases(), 'value'))],
|
|
'subject' => ['required', 'string', 'max:150'],
|
|
'message' => ['required', 'string'],
|
|
];
|
|
}
|
|
}
|