<?php

use App\Http\Controllers\BkashController;
use App\Http\Controllers\BkashPaymentController;
use Illuminate\Support\Facades\Route;

// Route::get('/', function () {
//     return view('welcome');
// });



Route::middleware(['web', 'login.check'])->group(function () {
    Route::get('/', [BkashController::class, 'index'])->name('home');
    Route::get('/payment-history', [BkashController::class, 'paymentHistory'])->name('payment-history');
    Route::get('/bkash-payment-history', [BkashController::class, 'bkashPaymentHistory'])->name('bkash-payment-history');
    Route::get('/setting', [BkashController::class, 'setting'])->name('setting');
    Route::post('/logout', [BkashController::class, 'logout'])->name('logout');
    // Route::post('/payment', [BkashPaymentController::class, 'payment'])->name('payment');
    Route::post('/payment', [BkashPaymentController::class, 'payment'])->name('payment');
    Route::get('/execute-bkash-payment', [BkashPaymentController::class, 'executePayment'])->name('execute-bkash-payment');
    Route::get('/bkash-paymnet-complete', [BkashPaymentController::class, 'completeBKashPayment'])->name('bkash-paymnet-complete');
    Route::get('/bkash-paymnet-fail', [BkashPaymentController::class, 'paymentFail'])->name('bkash-paymnet-fail');
});


Route::get('/login', [BkashController::class, 'login'])->name('login')->middleware('redirectIfAuth');

Route::post('/login',[BkashController::class,'loginCheck'])->name('login.post');
