<?php

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

Route::get('/addresses',         [AddressController::class, 'showBySource'])->middleware('permission:config.address,view');
Route::get('/addresses/{id}',    [AddressController::class, 'show'])->middleware('permission:config.address,view');
Route::post('/addresses',        [AddressController::class, 'store'])->middleware('permission:config.address,add');
Route::put('/addresses/{id}',    [AddressController::class, 'update'])->middleware('permission:config.address,edit');
Route::delete('/addresses/{id}', [AddressController::class, 'destroy'])->middleware('permission:config.address,delete');
Route::get('/addresses-primary', [AddressController::class, 'showPrimaryBySource'])->middleware('permission:config.address,view');
