fix: edit components.tour and navbar
This commit is contained in:
+30
-51
@@ -1,70 +1,49 @@
|
||||
<?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 $table = 'tours';
|
||||
|
||||
protected $casts = [
|
||||
'file_id' => 'int',
|
||||
'duration' => 'int',
|
||||
protected $casts = [
|
||||
'file_id' => 'int',
|
||||
'duration' => 'int',
|
||||
'views' => 'int',
|
||||
'status' => 'int',
|
||||
'created_at' => 'datetime'
|
||||
];
|
||||
'price' => 'int',
|
||||
'status' => 'int',
|
||||
'created_at' => 'datetime',
|
||||
'updated_at' => 'datetime',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'title',
|
||||
'summary',
|
||||
'description',
|
||||
'origin',
|
||||
'destination',
|
||||
'file_id',
|
||||
'duration',
|
||||
protected $fillable = [
|
||||
'title',
|
||||
'summary',
|
||||
'description',
|
||||
'origin',
|
||||
'destination',
|
||||
'file_id',
|
||||
'duration',
|
||||
'views',
|
||||
'status',
|
||||
'created_at'
|
||||
];
|
||||
'price',
|
||||
'status',
|
||||
'created_at',
|
||||
];
|
||||
|
||||
public function file()
|
||||
{
|
||||
return $this->belongsTo(File::class);
|
||||
}
|
||||
public function file()
|
||||
{
|
||||
return $this->belongsTo(File::class);
|
||||
}
|
||||
|
||||
public function tour_dates()
|
||||
{
|
||||
return $this->hasMany(TourDate::class);
|
||||
}
|
||||
|
||||
public function tour_dates()
|
||||
{
|
||||
return $this->hasMany(TourDate::class);
|
||||
}
|
||||
public function comments()
|
||||
{
|
||||
return $this->hasMany(Comment::class, 'tour_id');
|
||||
|
||||
@@ -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>
|
||||
Reference in New Issue
Block a user