fix beberapa revisi
This commit is contained in:
@@ -22,6 +22,13 @@ class CabangController extends Controller
|
||||
]);
|
||||
}
|
||||
|
||||
public function getCabangByRegion($regionCode)
|
||||
{
|
||||
$region_id = Region::where('code', $regionCode)->first()->id;
|
||||
$cabang = Cabang::where('region_id', $region_id)->get(['code', 'name']);
|
||||
return response()->json($cabang);
|
||||
}
|
||||
|
||||
public function create()
|
||||
{
|
||||
$this->checkAuthorization(auth()->user(), ['cabang.create']);
|
||||
|
||||
Reference in New Issue
Block a user