<?php

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

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    abort(404);
});

Auth::routes(['register' => config('app.registration_enabled')]);

Route::middleware('auth')->prefix('adm')->as('adm.')->group(callback: function(){

    Route::get('/', [AdminController::class, 'index'])->name('index');

    Route::get('reports', [AdminController::class, 'reports'])->name('reports');

    Route::resource('client', \App\Http\Controllers\ClientController::class);

    Route::resource('project', \App\Http\Controllers\ProjectController::class);

    Route::resource('payment', \App\Http\Controllers\PaymentController::class);

    Route::resource('note', \App\Http\Controllers\NoteController::class)->except(['show']);
});
