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.
30 lines
920 B
PHP
30 lines
920 B
PHP
<?php
|
|
|
|
use App\Enums\FeedbackStatus;
|
|
use App\Enums\FeedbackType;
|
|
use Illuminate\Database\Migrations\Migration;
|
|
use Illuminate\Database\Schema\Blueprint;
|
|
use Illuminate\Support\Facades\Schema;
|
|
|
|
return new class extends Migration
|
|
{
|
|
public function up(): void
|
|
{
|
|
Schema::create('feedbacks', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->foreignId('user_id')->constrained()->cascadeOnDelete();
|
|
$table->enum('type', array_column(FeedbackType::cases(), 'value'));
|
|
$table->string('subject', 150);
|
|
$table->text('message');
|
|
$table->enum('status', array_column(FeedbackStatus::cases(), 'value'))->default(FeedbackStatus::Submitted->value);
|
|
$table->text('admin_notes')->nullable();
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('feedbacks');
|
|
}
|
|
};
|