Raffales-LMS/app/Modules/Models/Country/Country.php
2024-04-16 15:43:24 +05:45

29 lines
548 B
PHP

<?php
namespace App\Modules\Models\Country;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Country extends Model
{
use HasFactory;
protected $fillable = [
'country_name',
'phone_code',
'country_code',
'status'
];
public function provinces()
{
return $this->hasMany(Province::class);
}
public static function getCountries()
{
return self::select('id','country_name')->where('status','Active')->get();
}
}