私が必要とするのは、以前のプロジェクトで使用していた古いデータベースに新しいプロジェクトを接続することでした。それは必須です。私はLaravel Php artisan migrateエラー
class attendance extends Model
{
protected $table = "attendance";
protected $fillable = ['id',
'trainee_id',
'name',
'time'
];
}
attendance.phpデータモデル
を作成しているように、その後の移行は、ここにcreate_attendance_table
Schema::create('attendance', function (Blueprint $table) {
$table->increments('id');
$table->string('trainee_id');
$table->strind('name');
$table->string('time');
$table->rememberToken();
$table->timestamps();
});
だけでなくとも呼ば.env
APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:aMklPOtN0cQEm2OiaeFpBaw75ghPLTxvj8Yx7PrQ8Gc=
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=Training_Management
DB_USERNAME=root
DB_PASSWORD=
BROADCAST_DRIVER=log
CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
PUSHER_APP_ID=
PUSHER_APP_KEY=
PUSHER_APP_SECRET=
ですこれは私が得ているエラーです。あなた移行ファイルのcreate_attendance_tableで
へ
–