<?php

use App\User;
use Illuminate\Database\Seeder;

class UsersTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        factory(User::class)->create([
            'name'     => 'Administrator',
            'username' => 'admin',
        ]);
    }
}

<?php

use App\User;
use Illuminate\Database\Seeder;

class UsersTableSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        User::create([
            'name'           => 'Administrator',
            'username'       => 'admin',
            'password'       => 'secret',
            'remember_token' => str_random(10),
        ]);
    }
}

Change user database seeder to User create
Change user database seeder to User create

Factory helper uses Faker, which only dev dependency
If we use command "composer install --no-dev"
the database user seeder will throw error because
Faker not found.