Add backend operation to use with MyKad reader feature
This commit is contained in:
@@ -7,6 +7,12 @@ use Illuminate\Http\Request;
|
||||
|
||||
class DaerahController extends Controller
|
||||
{
|
||||
public function index()
|
||||
{
|
||||
$daerah = Daerah::on('mysql7')->with('negeri')->get();
|
||||
return response()->json($daerah);
|
||||
}
|
||||
|
||||
public function showOneDaerah($koddaerah)
|
||||
{
|
||||
$daerah = Daerah::on('mysql7')
|
||||
@@ -20,7 +26,7 @@ class DaerahController extends Controller
|
||||
$daerah = Daerah::on('mysql7')
|
||||
->where('kodnegeri','=',$kodnegeri)
|
||||
->get();
|
||||
|
||||
|
||||
return response()->json($daerah);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user