Answer the question
In order to leave comments, you need to log in
Where can I change the default settings?
When
I run the command php artisan db:seed --class=UserTableSeeder
There is a user table and not users.
It is not clear where are the settings in Laravel for this?
Doctrine\DBAL\Driver\PDOException::("SQLSTATE[42S02]: Base table or view not found: 1146 Table 'conlineltd.users' doesn't exist")
class UserTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$users = factory(User::class,3)->create();
Log::channel('stack')->info('Created users.. ',$users);
}
}
$factory->define(App\User::class, function (Faker $faker) {
return [
'name' => $faker->name,
'email' => $faker->unique()->safeEmail,
'password' => crypt(rand(1,1000),'plmaks'),
'remember_token' => str_random(10)
];
});
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question