21 lines
805 B
PHP
21 lines
805 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use Illuminate\Support\Facades\Config;
|
|
use Illuminate\Support\Facades\Route;
|
|
use Presentation\Api\V1\Http\Controllers\Employees\EmployeeShowController;
|
|
use Presentation\Api\V1\Http\Controllers\Employees\EmployeesIndexController;
|
|
|
|
Route::get('/', fn () => response()->json(Config::string('app.name') . ' v1'))->name('root');
|
|
|
|
Route::get('/ping', fn () => response()->json('pong'))->name('ping');
|
|
|
|
Route::get('/openapi', function () {
|
|
return response()->file(
|
|
base_path('documentation/OpenApi/openapi.yaml'),
|
|
['Content-Type' => 'application/yaml']
|
|
);
|
|
})->name('openapi');
|
|
Route::get('/employees', EmployeesIndexController::class)->name('employees.index');
|
|
Route::get('/employees/{employeeId}', EmployeeShowController::class)->name('employees.show');
|