StocksNew/Modules/Admin/app/Models/District.php
Sampanna Rimal 53c0140f58 first commit
2024-08-27 17:48:06 +05:45

41 lines
848 B
PHP

<?php
namespace Modules\Admin\Models;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Modules\Admin\Database\factories\DistrictFactory;
class District extends Model
{
use HasFactory;
protected $table = "tbl_districts";
/**
* The attributes that are mass assignable.
*/
protected $fillable = [
'name',
'province_id',
'status',
'description',
'remarks',
'createdBy',
'updatedBy',
];
protected function province(){
return $this->belongsTo(Province::class,'province_id');
}
// protected function name(): Attribute
// {
// return Attribute::make(
// get: fn($value) => strtolower($value),
// );
// }
}