add api negeri poskod daerah

This commit is contained in:
Zakwan Hamdan
2020-11-02 16:56:57 +08:00
parent 07a3185834
commit 6aa1d91f5b
7 changed files with 142 additions and 0 deletions
+17
View File
@@ -0,0 +1,17 @@
<?php
namespace App\Http\Controllers;
use App\Negeri;
use Illuminate\Http\Request;
class NegeriController extends Controller
{
public function showOneNegeri($kodnegeri)
{
$negeri = Negeri::on('mysql7')
->where('kodnegeri','=',$kodnegeri)
->first();
return response()->json($negeri);
}
}