<?php

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

Route::get('/payment',         [PaymentController::class, 'index'])->middleware('permission:payment,view');
Route::post('/payment',        [PaymentController::class, 'store'])->middleware('permission:payment,add');
Route::post('/payment/schedule/{schedule}/pay', [PaymentController::class, 'paySchedule'])->middleware('permission:config.schedule,edit');
Route::get('/payment/{id}',    [PaymentController::class, 'show'])->middleware('permission:payment,view');
Route::put('/payment/{id}',    [PaymentController::class, 'update'])->middleware('permission:payment,edit');
Route::delete('/payment/{id}', [PaymentController::class, 'destroy'])->middleware('permission:payment,delete');
