35 lines
688 B
PHP
35 lines
688 B
PHP
<?php
|
|
|
|
namespace Modules\Admin\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
use Modules\Admin\Database\factories\ProvinceFactory;
|
|
|
|
class Province extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $table = "tbl_provinces";
|
|
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*/
|
|
protected $fillable = [
|
|
'name',
|
|
'country_id',
|
|
'status',
|
|
'description',
|
|
'remarks',
|
|
'createdBy',
|
|
'updatedBy',
|
|
];
|
|
|
|
protected function country()
|
|
{
|
|
return $this->belongsTo(Country::class, 'country_id');
|
|
}
|
|
|
|
}
|