database/seeds/DatabaseSeeder.php
/**
     * Run the database seeds.
     *
     * @return void
     */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
    {
        DB::table('users')->insert([
            'username' => "Admin",
            'email' => 'admin@mail.com',
            'password' => app('hash')->make('secret'),
            'uid'=>Uuid::uuid4()->toString(),
            'is_active'=>true,
            'role'=>'ADMIN'
        ]);
        DB::table('users')->insert([
            'username' => "Staff",
            'email' => 'staff@mail.com',
            'password' => app('hash')->make('secret'),
            'uid'=>Uuid::uuid4()->toString(),
            'is_active'=>true,
            'role'=>'STAFF'
        ]);
        DB::table('users')->insert([
            'username' => "Company",
            'email' => 'company@mail.com',
            'password' => app('hash')->make('secret'),
            'uid'=>Uuid::uuid4()->toString(),
            'is_active'=>true,
            'role'=>'COMPANY'
        ]);
        DB::table('users')->insert([
            'username' => "Staff",
            'email' => 'staff@mail.com',
            'password' => app('hash')->make('secret'),
            'uid'=>Uuid::uuid4()->toString(),
            'is_active'=>true,
            'role'=>'STAFF'
        ]);
    }
public function run ( ) { DB :: table ( 'users' ) -> insert ( [ 'username' => " Admin " , 'email' => 'admin@mail.com' , 'password' => app ( 'hash' ) -> make ( 'secret' ) , 'uid' => Uuid :: uuid4 ( ) -> toString ( ) , 'is_active' => true , 'role' => 'ADMIN' ] ) ; DB :: table ( 'users' ) -> insert ( [ 'username' => " Staff " , 'email' => 'staff@mail.com' , 'password' => app ( 'hash' ) -> make ( 'secret' ) , 'uid' => Uuid :: uuid4 ( ) -> toString ( ) , 'is_active' => true , 'role' => 'STAFF' ] ) ; DB :: table ( 'users' ) -> insert ( [ 'username' => " Company " , 'email' => 'company@mail.com' , 'password' => app ( 'hash' ) -> make ( 'secret' ) , 'uid' => Uuid :: uuid4 ( ) -> toString ( ) , 'is_active' => true , 'role' => 'COMPANY' ] ) ; DB :: table ( 'users' ) -> insert ( [ 'username' => " Staff " , 'email' => 'staff@mail.com' , 'password' => app ( 'hash' ) -> make ( 'secret' ) , 'uid' => Uuid :: uuid4 ( ) -> toString ( ) , 'is_active' => true , 'role' => 'STAFF' ] ) ; }
Run the database seeds.
Run the database seeds .
// $this->call('UsersTableSeeder');