* Fix CI/CD php version

* Add Pint
* Format code
This commit is contained in:
Fabián Gonzalo Artur de la Villarmois
2026-03-29 17:49:51 +13:00
parent 0993bfa666
commit bae79d68ab
17 changed files with 114 additions and 59 deletions
+4 -2
View File
@@ -1,5 +1,7 @@
<?php
use App\Http\Controllers\DBI\IndexController as DBIIndexController;
use App\Http\Controllers\Tinfoil\IndexController as TinfoilIndexController;
use Illuminate\Support\Facades\Route;
/*
@@ -7,9 +9,9 @@ use Illuminate\Support\Facades\Route;
| API Routes
|--------------------------------------------------------------------------
*/
Route::get('tinfoil', \App\Http\Controllers\Tinfoil\IndexController::class)
Route::get('tinfoil', TinfoilIndexController::class)
->name('tinfoil');
Route::get('dbi/{path?}', \App\Http\Controllers\DBI\IndexController::class)
Route::get('dbi/{path?}', DBIIndexController::class)
->where('path', '.*')
->name('dbi');
+9 -9
View File
@@ -6,37 +6,37 @@ use Illuminate\Support\Facades\Route;
Route::view('/', 'welcome')->middleware([
EnsureIsDbiClient::class,
EnsureIsTinfoilClient::class
EnsureIsTinfoilClient::class,
]);
Route::get('/docs/{page}', function ($page) {
$allowedPages = ['TINFOIL', 'DBI'];
if (!in_array($page, $allowedPages)) {
if (! in_array($page, $allowedPages)) {
abort(404);
}
$content = file_get_contents(base_path("docs/{$page}.md"));
// Convert relative image paths to absolute paths for web viewing
$content = str_replace(
'](images/',
'](/docs-images/',
$content
);
return view('docs', ['content' => $content, 'title' => $page]);
})->name('docs');
Route::get('/docs-images/{path}', function ($path) {
$imagePath = base_path("docs/images/{$path}");
if (!file_exists($imagePath)) {
if (! file_exists($imagePath)) {
abort(404);
}
return response()->file($imagePath);
})->where('path', '.*')->name('docs.images');
Route::get('/{path}', fn() => response('Not Found', 404))
Route::get('/{path}', fn () => response('Not Found', 404))
->where('path', '(?!api|docs-images).*')
->middleware(EnsureIsDbiClient::class);