fix: edit components.tour and navbar
This commit is contained in:
+30
-51
@@ -1,70 +1,49 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
|
||||||
* Created by Reliese Model.
|
|
||||||
*/
|
|
||||||
|
|
||||||
namespace App\Models;
|
namespace App\Models;
|
||||||
|
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use Illuminate\Database\Eloquent\Collection;
|
use Illuminate\Database\Eloquent\Collection;
|
||||||
use Illuminate\Database\Eloquent\Model;
|
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
|
class Tour extends Model
|
||||||
{
|
{
|
||||||
protected $table = 'tours';
|
protected $table = 'tours';
|
||||||
public $timestamps = false;
|
|
||||||
|
|
||||||
protected $casts = [
|
protected $casts = [
|
||||||
'file_id' => 'int',
|
'file_id' => 'int',
|
||||||
'duration' => 'int',
|
'duration' => 'int',
|
||||||
'views' => 'int',
|
'views' => 'int',
|
||||||
'status' => 'int',
|
'price' => 'int',
|
||||||
'created_at' => 'datetime'
|
'status' => 'int',
|
||||||
];
|
'created_at' => 'datetime',
|
||||||
|
'updated_at' => 'datetime',
|
||||||
|
];
|
||||||
|
|
||||||
protected $fillable = [
|
protected $fillable = [
|
||||||
'title',
|
'title',
|
||||||
'summary',
|
'summary',
|
||||||
'description',
|
'description',
|
||||||
'origin',
|
'origin',
|
||||||
'destination',
|
'destination',
|
||||||
'file_id',
|
'file_id',
|
||||||
'duration',
|
'duration',
|
||||||
'views',
|
'views',
|
||||||
'status',
|
'price',
|
||||||
'created_at'
|
'status',
|
||||||
];
|
'created_at',
|
||||||
|
];
|
||||||
|
|
||||||
public function file()
|
public function file()
|
||||||
{
|
{
|
||||||
return $this->belongsTo(File::class);
|
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()
|
public function comments()
|
||||||
{
|
{
|
||||||
return $this->hasMany(Comment::class, 'tour_id');
|
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