<?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);
    }

    public function NegeriListAll()
    {
        $negeri = Negeri::on('mysql7')
                    ->where('kodnegeri','<>','17')
                    ->where('kodnegeri','<>','00')
                    ->get();

        return response()->json($negeri);
    }
}