我正试图用:
php artisan make:seed
但是,我得到了错误:
Not enough arguments (missing: "name").
我不知道为什么,这是我要制造的种子:
class ProfessionSeeder extends Seeder
{
public function run()
{
DB::table('professions')->insert([
'title' => 'Desarrollador Back End'
]);
}
}
这是与数据库表相对应的迁移...
class CreateProfessionsTable extends Migration
{
public function up()
{
Schema::create('professions',function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('title',100);
$table->timestamps();
});
}
有什么想法吗?
谢谢!