krgm.so-manager-dev.com/app/Http/Controllers/HomeController.php
OU.ZAIKOU 13d2ecfceb
All checks were successful
Deploy main / deploy (push) Successful in 25s
【ログイン】二重認証実装
2026-01-21 22:37:38 +09:00

39 lines
1.1 KiB
PHP
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\City;
use App\Services\MenuAccessService;
class HomeController extends Controller
{
/**
* コントローラーのインスタンス作成
* Laravel 12変更点ミドルウェアは routes/web.php で処理するように変更
*
* @return void
*/
public function __construct()
{
// Laravel 12: ミドルウェアは routes/web.php で処理
// Laravel 5.7: $this->middleware('auth'); を使用していた
}
/**
* アプリケーションのダッシュボードを表示
* 認証後のホーム画面
*
* @param MenuAccessService $menuAccessService メニューアクセス制御サービス
* @return \Illuminate\Http\Response
*/
public function index(MenuAccessService $menuAccessService)
{
// ログイン中のオペレータが表示可能な自治体一覧を取得
$visibleCities = $menuAccessService->visibleCities();
$isSorin = $menuAccessService->isSorin();
return view('home', compact('visibleCities', 'isSorin'));
}
}