Explore/ismail (#12)

Co-authored-by: ISMAIL MASSERAN <topaz@ISMAILs-Macbook.local>
Co-authored-by: ISMAIL MASSERAN <topaz@Mac.dlinkrouter.local>
Reviewed-on: #12
Co-authored-by: ismailmasseran <ismail@koppkb.com>
Co-committed-by: ismailmasseran <ismail@koppkb.com>
This commit was merged in pull request #12.
This commit is contained in:
2026-09-09 14:47:33 +08:00
committed by afrina
parent 5fc212f6af
commit 7920eb9f71
38 changed files with 4093 additions and 90 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)