<?php

use App\Http\Controllers\StateController;
use Illuminate\Support\Facades\Route;

Route::get('/state',              [StateController::class, 'index'])->middleware('permission:config.state,view');
Route::post('/state',             [StateController::class, 'store'])->middleware('permission:config.state,add');
Route::get('/state/{id}',         [StateController::class, 'show'])->middleware('permission:config.state,view');
Route::put('/state/{id}',         [StateController::class, 'update'])->middleware('permission:config.state,edit');
Route::delete('/state/{id}',      [StateController::class, 'destroy'])->middleware('permission:config.state,delete');
Route::get('/state-country/{id}', [StateController::class, 'allByCountryId'])->middleware('permission:config.state,view');
