PCS開発チーム
PCS開発チーム
Laravel11(未スリム化)にヘルスチェックルートを追加
ここで定義されているので同じようなルートを作ればいい。
https://github.com/laravel/framework/blob/08acc925f1ec8e1c41a54774a36720f506c5b5a8/src/Illuminate/Foundation/Configuration/ApplicationBuilder.php#L191
使い回しやすいように個別にroutes/health.php
を作り
<?php
use Illuminate\Foundation\Events\DiagnosingHealth;
use Illuminate\Support\Facades\Event;
use Illuminate\Support\Facades\Route;
Route::get('up', function () {
Event::dispatch(new DiagnosingHealth);
return View::file(__DIR__.'/../vendor/laravel/framework/src/Illuminate/Foundation/resources/health-up.blade.php');
});
routes/web.php
に追加
require __DIR__.'/health.php';
別プロジェクトでもroutes/health.php
をコピーして使う。
不要になったら削除。
少しずつLaravel11に近付けたらスリム化も簡単なので一気に切り換えられる。