<?php

namespace App\Http\Controllers;

use App\Models\Province;
use Illuminate\Http\Request;

class ProvinceController extends Controller
{
  /*  public function getProvinces(){

        $data = Province::orderBy('name_th')->get();
        return response()->json($data, 200);

        // $data = Province::paginate(10,['*'],'page',$offset);
        // return $data->items();
        // return [
        //     'total_size' => $data->total(),
        //     'limit' => 10,
        //     'offset' => $offset,
        //     'provinces' => $data->items()
        // ];

    }

    public function index(){
        $provinces = Province::all();
        return view('pages.provinces.index',compact('provinces'));
    }
	*/
}
