feat:implement comments controllers and form request and add comment model
This commit is contained in:
@@ -6,12 +6,13 @@
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use App\Enums\CommentStatus;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class Comment
|
||||
*
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $user_id
|
||||
* @property int|null $flight_id
|
||||
@@ -21,7 +22,7 @@ use Illuminate\Database\Eloquent\Model;
|
||||
* @property int $status
|
||||
* @property Carbon $created_at
|
||||
* @property Carbon|null $updated_at
|
||||
*
|
||||
*
|
||||
* @property Flight|null $flight
|
||||
* @property Tour|null $tour
|
||||
* @property User $user
|
||||
@@ -38,7 +39,7 @@ class Comment extends Model
|
||||
'flight_id' => 'int',
|
||||
'tour_id' => 'int',
|
||||
'rating' => 'int',
|
||||
'status' => 'int'
|
||||
'status' => CommentStatus::class,
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
@@ -46,8 +47,9 @@ class Comment extends Model
|
||||
'flight_id',
|
||||
'tour_id',
|
||||
'comment',
|
||||
'rating',
|
||||
'status'
|
||||
'status',
|
||||
'guest_name',
|
||||
'guest_email',
|
||||
];
|
||||
|
||||
public function flight()
|
||||
|
||||
Reference in New Issue
Block a user