システム管理者用の Admin モデルと教員用の Professor モデルを生成します.
vagrant@ubuntu2204 laravelAuth $ php artisan make:model Admin ⏎ INFO Model [app/Models/Admin.php] created successfully. vagrant@ubuntu2204 laravelAuth $ php artisan make:model Professor ⏎ INFO Model [app/Models/Professor.php] created successfully. vagrant@ubuntu2204 laravelAuth $
生成されたモデルはそれぞれ次の通りです.
app/Models/Admin.php
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Admin extends Model
{
use HasFactory;
}
app/Models/Professor.php
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Professor extends Model
{
use HasFactory;
}