Удалите DB:table
из вашей миграции и запустите:
php artisan migrate:refresh
Затем
php artisan make:seed LocationTableSeeder
Затем добавить это к run()
функции:
DB::table('locations')->insert([
['type' => 1, 'name' => 'Istanbul', 'pid' => 0, 'cid' => 0, 'created_at' => Carbon::now()->format('Y-m-d H:i:s'), 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')],
['type' => 2, 'name' => 'Istanbul', 'pid' => 1, 'cid' => 0, 'created_at' => Carbon::now()->format('Y-m-d H:i:s'), 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')],
['type' => 3, 'name' => 'Taksim', 'cid' => 2, 'pid' => 0, 'created_at' => Carbon::now()->format('Y-m-d H:i:s'), 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')],
['type' => 3, 'name' => 'Beyoglu', 'cid' => 2, 'pid' => 0, 'created_at' => Carbon::now()->format('Y-m-d H:i:s'), 'updated_at' => Carbon::now()->format('Y-m-d H:i:s')],
]);
Затем
php artisan db:seed --class=LocationTableSeeder