module updated

This commit is contained in:
2024-04-10 15:21:30 +05:45
parent c1a81191fa
commit 3267e212f7
71 changed files with 1390 additions and 1812 deletions

View File

@ -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();
}
}