2024-12-11 12:29:55 +07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
|
|
|
|
|
|
class Rayon extends Model
|
|
|
|
|
{
|
|
|
|
|
use SoftDeletes;
|
|
|
|
|
|
|
|
|
|
protected $table = 'rayon';
|
2025-01-19 14:57:01 +07:00
|
|
|
protected $fillable = ['code', 'name', 'cabang_id'];
|
2025-01-19 15:48:50 +07:00
|
|
|
|
|
|
|
|
public function cabang()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo('App\Models\Cabang');
|
|
|
|
|
}
|
2025-10-12 18:29:07 +07:00
|
|
|
|
|
|
|
|
public function region()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo(\App\Models\Region::class, 'region_id', 'id');
|
|
|
|
|
}
|
2024-12-11 12:29:55 +07:00
|
|
|
}
|