StocksNew/Modules/Admin/app/Models/Province.php

35 lines
688 B
PHP
Raw Normal View History

2024-08-27 12:03:06 +00:00
<?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');
}
}