37 lines
770 B
PHP
37 lines
770 B
PHP
<?php
|
|
|
|
namespace Modules\CountryList\app\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Modules\Destination\app\Models\Destination;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Modules\CountryList\Database\factories\CountryFactory;
|
|
use Modules\Package\app\Models\Package;
|
|
|
|
class Country extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*/
|
|
protected $fillable = [
|
|
'name',
|
|
'code',
|
|
];
|
|
|
|
public function destinations(){
|
|
return $this->hasMany(Destination::class);
|
|
}
|
|
|
|
public function packages(){
|
|
return $this->hasMany(Package::class);
|
|
}
|
|
|
|
protected static function newFactory(): CountryFactory
|
|
{
|
|
//return CountryFactory::new();
|
|
|
|
}
|
|
}
|