システム管理者用と教員用の DashboardController をそれぞれ admin フォルダと professor フォルダ内に生成します.
vagrant@ubuntu2204 laravelAuth $ php artisan make:controller Admin/DashboardController ⏎ INFO Controller [app/Http/Controllers/Admin/DashboardController.php] created successfully. vagrant@ubuntu2204 laravelAuth $ php artisan make:controller Professor/DashboardController ⏎ INFO Controller [app/Http/Controllers/Professor/DashboardController.php] created successfully. vagrant@ubuntu2204 laravelAuth $
生成されたコントローラを確認します.いずれも設置したフォルダの情報が含まれていことに注意して下さい.
app/Http/Controllers/Admin/DashboardController.php
<?php
namespace App\Http\Controllers\Admin;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class DashboardController extends Controller
{
//
}
app/Http/Controllers/Professor/DashboardController.php
<?php
namespace App\Http\Controllers\Professor;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
class DashboardController extends Controller
{
//
}