src/Database/Seeds/UserTableSeeder.php
public function run()
    {
        User::insert([
            'name' => 'admin',
            'email' => 'admin@localhost',
            'password' => bcrypt('password'),
        ]);

        User::first()->attachRole(Role::create([
            'name' => 'Admin',
            'slug' => 'admin',
            'description' => '', // optional
            'parent_id' => NULL, // optional, set to NULL by default
        ]));

        Role::first()->attachPermission(Permission::create([
            'name' => 'Admin Dashboard',
            'slug' => 'admin.dashboard',
            'description' => '', // optional
        ]));

    }
public function run()
    {
        User::insert([
            'name' => 'admin',
            'email' => 'admin@localhost',
            'password' => bcrypt('password'),
        ]);

        User::first()->attachRole(Role::create([
            'name' => 'Admin',
            'slug' => 'admin',
            'description' => '', // optional
            'parent_id' => NULL, // optional, set to NULL by default
        ]));

        Role::first()->attachPermission(Permission::create([
            'name' => 'Admin Dashboard',
            'slug' => 'admin.dashboard',
            'description' => '', // optional
        ]));

    }
Run the database seeds.

@return void