Booking, QI Content, Trees, Media
This commit is contained in:
parent
1f340e96fa
commit
7fbac395a9
260 changed files with 27160 additions and 3773 deletions
|
|
@ -3,6 +3,7 @@
|
|||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* App\Models\TravelCountry
|
||||
|
|
@ -47,7 +48,16 @@ class TravelCountry extends Model
|
|||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'slug',
|
||||
'html_information',
|
||||
'text_before',
|
||||
'text_after',
|
||||
'contact_headline',
|
||||
'contact_text_1',
|
||||
'contact_text_2',
|
||||
'contact_text_3',
|
||||
'contact_text_4',
|
||||
'contact_footer',
|
||||
'entry_requirements',
|
||||
'is_customer_country',
|
||||
'active_frontend',
|
||||
|
|
@ -72,6 +82,13 @@ class TravelCountry extends Model
|
|||
return $this->hasMany('App\Models\TravelNationalityRequirement', 'travel_country_id', 'id');
|
||||
}
|
||||
|
||||
public function setSlugAttribute( $value ) {
|
||||
if(!isset($value) || $value == ""){
|
||||
$this->attributes['slug'] = Str::slug(pre_slug($this->name), '-');
|
||||
}else{
|
||||
$this->attributes['slug'] = Str::slug(pre_slug($value), '-');
|
||||
}
|
||||
}
|
||||
|
||||
public function getNationalityRequirement($travel_nationality_id){
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue