<?php

use App\Http\Controllers\api\v1\User\UserBankController;
use Illuminate\Support\Facades\Route;

Route::middleware(['user.auth'])->group( //only admin access
    function () {
        Route::controller(UserBankController::class)->group(function () {
            Route::get('/', 'index');
            Route::get('/primary', 'getPrimary');
            Route::get('/{bank_id}', 'show');
            Route::post('/', 'store');
            Route::put('/{bank_id}', 'update');
            Route::delete('/{bank_id}', 'destroy');
            Route::patch('/{bank_id}/set-primary', 'setPrimary');
            Route::get('generate-virtual-account', 'generateVirtualAccount');
        });
    }
);
