For your Eloquent not found see https://github.com/laravel/laravel/pull/2985/files
logaso said:
second : can't found class LinkSeeder, even if exists .
This problem still exists. I'm trying to seed Users table with UserTableSeeder.php but Artisan tells me that the class UserTableSeeder does not exist. Couldn't find a solution yet so I can't use DB Seeding.
UPDATE: I found a solution. First you have to run the optimize command to use DB seeding;
$ php artisan optimize
You also have to USE namespaced files like below;
// database/seeds/UserTableSeeder.php
<?php
use Illuminate\Database\Seeder;
use App\User;
class UserTableSeeder extends Seeder {
public function run()
{
DB::table('users')->truncate();
User::create(array('email' => '[email protected]'));
}
}
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community