module updated
This commit is contained in:
@ -8,6 +8,9 @@ use Illuminate\Database\Eloquent\Model;
|
||||
class Province extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
protected $table = 'tbl_provinces';
|
||||
protected $primaryKey = 'province_id';
|
||||
protected $fillable = [
|
||||
'province_name',
|
||||
'country_id',
|
||||
@ -17,14 +20,4 @@ class Province extends Model
|
||||
{
|
||||
return $this->belongsTo(Country::class);
|
||||
}
|
||||
|
||||
public static function getProvinces()
|
||||
{
|
||||
return self::select('id','province_name')->where('status','Active')->get();
|
||||
}
|
||||
|
||||
public static function getProvincesByCountryId($country_id)
|
||||
{
|
||||
return self::select('id','province_name')->where('status','Active')->where('country_id',$country_id)->get();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user