WouterJEloquentBundle
WouterJEloquentBundle copied to clipboard
"A facade root has not been set."
I'm having this error message when i execute
./bin/console eloquent:seed
in my eloquent config file i have this:
wouterj_eloquent:
# ...
eloquent: true
aliases:
db: true
And my DatabaseSeeder File looks like this:
namespace App\Seed;
use WouterJ\EloquentBundle\Seeder;
use Illuminate\Support\Facades\DB;
class DatabaseSeeder extends Seeder {
public function run() {
for ($i = 1; $i<=10; $i++) {
DB::table('juego')->insert([
'id' => $i,
'secret' => 'secret' . $i,
'name' => 'cliente' . $i,
]);
}
}
}
What am i missing here?
The problem here is that you are using Illuminate\Support\Facades\DB instead of WouterJ\EloquentBundle\Facade\Db.