Featured tours working
This commit is contained in:
17
app/Models/Tour.php
Normal file
17
app/Models/Tour.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
|
||||
|
||||
class Tour extends Model
|
||||
{
|
||||
protected $fillable = ['name', 'internal_name', 'short_description'];
|
||||
public $timestamps = false;
|
||||
|
||||
public function countries()
|
||||
{
|
||||
return $this->belongsToMany(Country::class, 'tour_countries', 'tour_id', 'country_id');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user