反射异常:类类名不存在 - Laravel
2022-08-30 09:08:23
一旦,我正在键入命令。php artisan db:seed
我收到错误,例如:
[反射异常]
类用户表搜索器不存在
root@dd-desktop:/opt/lampp/htdocs/dd/laravel# php artisan db:seed
Here, Is my & PageUserTableSeeder.php
DatabaseSeeder.php
UserTableSeeder.php
<?php
use Illuminate\Database\Seeder;
use Illuminate\Database\Eloquent\Model;
class UserTableSeeder extends Seeder
{
public function run()
{
DB::table('users')->delete();
User::create(array(
'name' => 'Chris Sevilleja',
'username' => 'sevilayha',
'email' => 'chris@scotch.io',
'password' => Hash::make('awesome'),
));
}
}
DatabaseSeeder.php
<?php
use Illuminate\Database\Seeder;
use Illuminate\Database\Eloquent\Model;
class DatabaseSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
Eloquent::unguard();
$this->call('UserTableSeeder');
}
}
我将此链接引用到设计和开发登录页面。请帮助我解决此问题。谢谢。