add api negeri poskod daerah
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use App\Daerah;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class DaerahController extends Controller
|
||||
{
|
||||
public function showOneDaerah($koddaerah)
|
||||
{
|
||||
$daerah = Daerah::on('mysql7')
|
||||
->where('koddaerah','=',$koddaerah)
|
||||
->first();
|
||||
return response()->json($daerah);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user