M
M
Maks Burkov2018-04-13 19:35:26
Laravel
Maks Burkov, 2018-04-13 19:35:26

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)
    ];
});

Table in database..
5ad0db4ed6c25515389559.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
J
JhaoDa, 2018-04-13
@Maks00088

Have you tried reading the documentation ? What about googling? The error is so primitive that it has already been repeatedly mentioned even here.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question