feat: complete wishlist in user dashboard

This commit is contained in:
2026-08-18 12:10:42 -07:00
parent 244461f667
commit 68c6250160
9 changed files with 398 additions and 10 deletions
+59
View File
@@ -0,0 +1,59 @@
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Model;
/**
* Class Wishlist
*
* @property int $id
* @property int $user_id
* @property int|null $flight_id
* @property int|null $tour_id
* @property Carbon|null $created_at
* @property Carbon|null $updated_at
*
* @property User $user
* @property Flight|null $flight
* @property Tour|null $tour
*
* @package App\Models
*/
class Wishlist extends Model
{
protected $table = 'wishlists';
public static $snakeAttributes = false;
protected $casts = [
'user_id' => 'int',
'flight_id' => 'int',
'tour_id' => 'int'
];
protected $fillable = [
'user_id',
'flight_id',
'tour_id'
];
public function user()
{
return $this->belongsTo(User::class);
}
public function flight()
{
return $this->belongsTo(Flight::class);
}
public function tour()
{
return $this->belongsTo(Tour::class, 'tour_id');
}
}