database/seeds/SeedFakeData.php
/**
     * Run the database seeds.
     *
     * @return void
     */
Run the database seeds.
@return void
Run the database seeds . @return void
public function run()
    {
        DB::statement('SET FOREIGN_KEY_CHECKS=0');
        Storage::deleteDirectory(config('custompath.users'));
        factory(App\User::class, 1)->create([
            'name' => env('DEMOUSER', 'Demo'),
            'email' => env('DEMOEMAIL', 'demouser@example.com'),
            'password' => bcrypt(env('DEMOPASS', 'password')),
            'role' => UserType::Admin,
        ]);
        if(config('app.env') !== 'production') {
            factory(App\User::class, 4)->create([
                'password' => bcrypt(env('DEMOPASS', 'password')),
            ]);
        }
    }
public function run ( ) { DB :: statement ( 'SET FOREIGN_KEY_CHECKS=0' ) ; Storage :: deleteDirectory ( config ( 'custompath.users' ) ) ; factory ( App \ User :: class , 1 ) -> create ( [ 'name' => env ( 'DEMOUSER' , 'Demo' ) , 'email' => env ( 'DEMOEMAIL' , 'demouser@example.com' ) , 'password' => bcrypt ( env ( 'DEMOPASS' , 'password' ) ) , 'role' => UserType :: Admin , ] ) ; if ( config ( 'app.env' ) !== 'production' ) { factory ( App \ User :: class , 4 ) -> create ( [ 'password' => bcrypt ( env ( 'DEMOPASS' , 'password' ) ) , ] ) ; } }
Run the database seeds.
Run the database seeds .