fix: edit components.tour and navbar

This commit is contained in:
2026-08-17 16:36:27 -07:00
parent 63a708c36f
commit 651775064f
2 changed files with 33 additions and 51 deletions
+6 -27
View File
@@ -1,46 +1,23 @@
<?php
/**
* Created by Reliese Model.
*/
namespace App\Models;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Model;
/**
* Class Tour
*
* @property int $id
* @property string $title
* @property string $summary
* @property string $description
* @property string $origin
* @property string $destination
* @property int|null $file_id
* @property int $duration
* @property int $status
* @property Carbon $created_at
* @property Carbon $updated_at
*
* @property File|null $file
* @property Collection|TourDate[] $tour_dates
*
* @package App\Models
*/
class Tour extends Model
{
protected $table = 'tours';
public $timestamps = false;
protected $casts = [
'file_id' => 'int',
'duration' => 'int',
'views' => 'int',
'price' => 'int',
'status' => 'int',
'created_at' => 'datetime'
'created_at' => 'datetime',
'updated_at' => 'datetime',
];
protected $fillable = [
@@ -52,8 +29,9 @@ class Tour extends Model
'file_id',
'duration',
'views',
'price',
'status',
'created_at'
'created_at',
];
public function file()
@@ -65,6 +43,7 @@ class Tour extends Model
{
return $this->hasMany(TourDate::class);
}
public function comments()
{
return $this->hasMany(Comment::class, 'tour_id');
+3
View File
@@ -0,0 +1,3 @@
<div>
<!-- I begin to speak only when I am certain what I will say is not better left unsaid. - Cato the Younger -->
</div>