Explore/ismail (#11)
Build Docker Image / build-backend (push) Successful in 22s

Co-authored-by: ISMAIL MASSERAN <topaz@ISMAILs-Macbook.local>
Co-authored-by: ISMAIL MASSERAN <topaz@Mac.dlinkrouter.local>
Co-authored-by: afrina <afrina@koppkb.com>
Reviewed-on: #11
This commit was merged in pull request #11.
This commit is contained in:
2026-09-09 10:32:18 +08:00
parent 51860cea37
commit 7bc405060c
41 changed files with 4131 additions and 126 deletions
+10 -1
View File
@@ -3,6 +3,7 @@
namespace App\Http\Controllers;
use App\Cawangan;
use App\Feature;
use Illuminate\Http\Request;
class CawanganController extends Controller
@@ -18,7 +19,15 @@ class CawanganController extends Controller
$cawangan = Cawangan::on('mysql7')
->where('kodcaw','=',$code_cawangan)
->first();
return response()->json($cawangan);
if (!$cawangan) {
return response()->json($cawangan);
}
$data = $cawangan->toArray();
$data['features'] = Feature::mapFor($code_cawangan);
return response()->json($data);
}
public function create(Request $request)