I am trying to seed some info on my oneway table but evertime I run php artisan db:seed, an error would occur
{"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","me
ssage":"Class 'Oneway' not found","file":"C:\\wamp\\www\\airlines\\app\\database
\\seeds\\OnewayTableSeeder.php","line":8}}
I have tried composer dump-autoload but still nothing happens. What seems to be the problem here? Is it on my composer or my codes.
OnewayTableSeeder.php
<?php
class OnewayTableSeeder extends Seeder{
public function run()
{
DB::table('oneway')->delete();
Oneway::create(
array(
'destination-from'=>'Bacolod',
'destination-to'=>'Cebu',
'departure'=> \Carbon\Carbon::createFromDate(2014,10,01)->toDateTimeString(),
));
Oneway::create(
array(
'destination-from'=>'Tawi-Tawi',
'destination-to'=>'Cebu',
'departure'=> \Carbon\Carbon::createFromDate(2014,10,03)->toDateTimeString(),
));
Oneway::create(
array(
'destination-from'=>'Cebu',
'destination-to'=>'Dipolog',
'departure'=> \Carbon\Carbon::createFromDate(2014,10,16)->toDateTimeString(),
));
}
}
DatabaseSeeder.php
<?php
class DatabaseSeeder extends Seeder {
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
Eloquent::unguard();
// $this->call('UserTableSeeder');
$this->call('OnewayTableSeeder');
}
}