why can Not seed users table???
`> >
vagrant@homestead:~/MyApp$ php artisan db:seed --class=UserSeeder
Illuminate\Contracts\Container\BindingResolutionException
Target class [UserSeeder] does not exist.
at vendor/laravel/framework/src/Illuminate/Container/Container.php:807 803| 804| try { 805| $reflector = new ReflectionClass($concrete); 806| } catch (ReflectionException $e) {
807| throw new BindingResolutionException("Target class [$concrete] does not exist.", 0, $e); 808| } 809| 810| // If the type is not instantiable, the developer is attempting to resolve 811| // an abstract type such as an Interface or Abstract Class and there is
+24 vendor frames
25 artisan:37 Illuminate\Foundation\Console\Kernel::handle() vagrant@homestead:~/MyApp$
class UserSeeder extends Seeder { /** * Seed the application's database. * * @return void */ public function run() { DB::table('users')->insert([ 'name' => Str::random(10), 'email' => Str::random(10).'@gmail.com', 'password' => Hash::make('password'), ]); //$this->call(UserSeeder::class); } }`
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community