<?php

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

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

Route::get('/busca-estado-cidade-por-descricao', [CityController::class, 'searchStateCityByDescription'])->middleware('permission:config.city,view');