<?php

use Illuminate\Support\Facades\Route;
use App\Http\Controllers\public\{userFitController, userCompanyController};
Route::middleware(['web', 'auth', 'company.info'])
    ->prefix('user-fit')
    ->name('user_fit.')
    ->group(function (): void {
        Route::get('/', [userFitController::class, 'dashboard'])->name('dashboard');
        Route::get('/users/image/{filename}', [userFitController::class, 'image'])
            ->where('filename', '[A-Za-z0-9._-]+')
            ->name('users.image');
        Route::get('/edituser/{user?}', [userFitController::class, 'edituser'])->name('edituser');
        Route::post('/edituser/{user}', [userFitController::class, 'storeUser'])->name('storeUser');
        Route::get('/pay/create', [userFitController::class, 'create'])->name('pay.create');
        Route::post('/pay/store', [userFitController::class, 'storePay'])->name('pay.store');
        Route::get('/company/image/{filename}', [userCompanyController::class, 'image'])
            ->where('filename', '[A-Za-z0-9._-]+')
            ->name('company.image');
});
