2024-12-11 12:29:55 +07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace App\Models;
|
|
|
|
|
|
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
|
|
|
|
|
|
class UserHasCabang extends Model
|
|
|
|
|
{
|
|
|
|
|
use SoftDeletes;
|
|
|
|
|
|
|
|
|
|
protected $table = 'user_has_cabang';
|
|
|
|
|
protected $fillable = [
|
|
|
|
|
'user_id',
|
|
|
|
|
'cabang_id',
|
|
|
|
|
];
|
2024-12-16 17:01:55 +07:00
|
|
|
|
|
|
|
|
public function user()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo('App\Models\Admin');
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public function cabang()
|
|
|
|
|
{
|
|
|
|
|
return $this->belongsTo('App\Models\Cabang');
|
|
|
|
|
}
|
2024-12-11 12:29:55 +07:00
|
|
|
}
|