added crud data master region & cabang

This commit is contained in:
Jagad R R
2025-01-08 14:12:45 +07:00
parent 1027b0dfb4
commit 314fefd52d
27 changed files with 983 additions and 15 deletions
+7
View File
@@ -167,4 +167,11 @@ class Admin extends Authenticatable
return [];
}
public static function getUserWhereRoleIsNot($roleName)
{
return self::whereDoesntHave('roles', function ($query) use ($roleName) {
$query->where('name', $roleName);
})->get();
}
}
+5
View File
@@ -27,4 +27,9 @@ class Cabang extends Model
{
return $this->belongsTo(Region::class, 'region_id');
}
public function cost()
{
return $this->belongsTo(CostCentre::class, 'cost_id');
}
}