I get an error "Class does not exist" when trying to populate my DB by executing
"php artisan seed:db".
UserMoviesSeeder.php in the folder database/seeds has the following content:
<?php
use Illuminate\Database\Seeder;
use App\Project;
use App\UserMovie;
use App\User;
class UserMoviesSeeder extends Seeder
{
public function run()
{
$this->call(ProjectsTableSeeder::class);
}
}
class ProjectsTableSeeder extends Seeder {
public function run()
{
DB::table('user_movies')->delete();
DB::disableQueryLog();
UserMovie::create([
'user_id' => 1734805,
'tmdb_id' => 100,
'ratio' => 4
]);
UserMovie::create([
'user_id' => 716091,
'tmdb_id' => 100,
'ratio' => 4
]);
}
}
I run the command:
php artisan db:seed --class=UserMoviesSeeder
And I get an error:
In Container.php line 752:
Class UserMoviesSeeder does not exist
Why?
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2uu1Em6
via IFTTT
Aucun commentaire:
Enregistrer un commentaire