When I try to run php artisan db:seed
I get the following error:
The use statement with non-compound name 'DB' has no effect
I have written my own seeder file which I have included below, based on a snippet from the doc. As you can see I am using the use DB
shortcut - is this what the problem is?
<?php
use Illuminate\Database\Seeder;
use Illuminate\Database\Eloquent\Model;
use DB;
class ClassesTableSeeder extends Seeder
{
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
DB::table('classes')->delete();
DB::table('classes')->insert([
'class_name' => 'Test course 111',
'class_id' => '1',
'location_name' => 'Barnes',
'location_id' => '1',
'date' => '2015-06-22',
'month' => '06/2015',
'start_time' => '08:00',
'end_time' => '16:00',
'places' => '19',
'places_left' => '19',
'price' => '155.00'
]);
}
}