12345678910111213141516171819202122232425262728293031323334353637 |
- <?php
- namespace Database\Seeders;
- use Illuminate\Database\Seeder;
- use Illuminate\Filesystem\Filesystem;
- use Carbon\Carbon;
- class DatabaseSeeder extends Seeder
- {
- /**
- * Seed the application's database.
- *
- * @return void
- */
- public function run()
- {
- $fileSystem = new Filesystem();
- $database = $fileSystem->get(base_path('init.sql/seeds') . '/' . 'init.sql');
- DB::connection()->getPdo()->exec($database);
- // DB::table('admin_users')->insert([
- // 'username' => 'admin',
- // 'real_name' => '超级管理员',
- // 'password' => bcrypt('admin'),
- // 'email' => 'user1@163.com',
- // 'mobile' => '123456',
- // 'avatar' => 'http://webimg-handle.liweijia.com/upload/avatar/avatar_0.jpg',
- // 'is_root' => 1
- // ]);
- DB::table('attachment_classes')->insert([
- 'class' => '未分类',
- 'created_at' => Carbon::now(),
- 'updated_at' => Carbon::now()
- ]);
- }
- }
|