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.
32 lines
666 B
PHP
32 lines
666 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Enums\FeedbackStatus;
|
|
use App\Enums\FeedbackType;
|
|
use Illuminate\Database\Eloquent\Attributes\Guarded;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
#[Guarded(['id'])]
|
|
class Feedback extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = 'feedbacks';
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'type' => FeedbackType::class,
|
|
'status' => FeedbackStatus::class,
|
|
];
|
|
}
|
|
|
|
public function user(): BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
}
|