public function run()
 {
     DB::table('users')->truncate();
     $faker = Faker::create();
     foreach (range(1, 10) as $i) {
         User::create(['name' => $faker->name(), 'email' => $faker->email(), 'password' => Hash::make($faker->word)]);
     }
 }
 /**
  * Create a new user instance after a valid registration.
  *
  * @param  array  $data
  * @return User
  */
 protected function create(array $data)
 {
     if (isset($data['admin']) && $data['admin'] == 'on') {
         $data['admin'] = true;
         return User::create(['name' => $data['name'], 'email' => $data['email'], 'cep' => $data['cep'], 'rua' => $data['rua'], 'complemento' => $data['complemento'], 'cidade' => $data['cidade'], 'estado' => $data['estado'], 'is_admin' => $data['admin'], 'password' => bcrypt($data['password'])]);
     }
     return User::create(['name' => $data['name'], 'email' => $data['email'], 'cep' => $data['cep'], 'rua' => $data['rua'], 'complemento' => $data['complemento'], 'cidade' => $data['cidade'], 'estado' => $data['estado'], 'password' => bcrypt($data['password'])]);
 }
 public function run()
 {
     DB::table('users')->truncate();
     factory('CodeCommerce\\User')->create(['name' => 'jander', 'email' => '*****@*****.**', 'password' => Hash::make('123456')]);
     factory('CodeCommerce\\User', 10)->create();
     foreach (range(1, 10) as $i) {
         User::create(['name' => $faker->name(), 'email' => $faker->email(), 'password' => Hash::make($faker->word)]);
     }
 }
 public function run()
 {
     DB::table('users')->truncate();
     $faker = Faker::create();
     User::create(['name' => 'Ricardo', 'email' => '*****@*****.**', 'password' => Hash::make(123456)]);
     foreach (range(1, 10) as $i) {
         User::create(['name' => $faker->name(), 'email' => $faker->email(), 'password' => Hash::make($faker->word)]);
     }
 }
 public function run()
 {
     //DB::table('users')->truncate();
     $faker = Faker::create();
     User::create(['name' => 'Gabriel', 'email' => '*****@*****.**', 'password' => \Illuminate\Support\Facades\Hash::make(123456)]);
     foreach (range(1, 10) as $i) {
         User::create(['name' => $faker->name(), 'email' => $faker->email(), 'password' => \Illuminate\Support\Facades\Hash::make($faker->word)]);
     }
 }
 /**
  * Create a new user instance after a valid registration.
  *
  * @param  array  $data
  * @return User
  */
 protected function create(array $data)
 {
     return User::create([
         'name' => $data['name'],
         'email' => $data['email'],
         'password' => bcrypt($data['password']),
         'street_address' => $data['street_address'],
         'city' => $data['city'],
         'state' => $data['state'],
         'zip_code' => $data['zip_code'],
     ]);
 }
 public function postRegister()
 {
     $user = User::create(['name' => Input::get('name'), 'email' => Input::get('email'), 'password' => bcrypt(Input::get('password')), 'remember_token' => Input::get('_token')]);
     $endereco = new Endereco();
     $endereco->estado = Input::get('uf');
     $endereco->cidade = Input::get('cidade');
     $endereco->bairro = Input::get('bairro');
     $endereco->rua = Input::get('rua');
     $endereco->numero = Input::get('numero');
     $endereco->user_id = $user->id;
     $endereco->save();
     $msg = "usuario criado com sucesso!";
     Session::flash('msgCadastro', $msg);
     return redirect()->route('auth.login');
 }
 public function run()
 {
     //METODO PARA INSERIR DADOS NO BANCO FICTICIO
     DB::table('users')->truncate();
     $faker = Faker::create();
     User::create(['name' => 'Rafael Franco', 'email' => '*****@*****.**', 'password' => \Illuminate\Support\Facades\Hash::make(123456), 'address' => 'Rua tal', 'number' => '123', 'neighborhood' => 'Casa', 'city' => 'São Paulo', 'zip' => '19050-260', 'state' => 'SP', 'is_admin' => 1]);
     //
     //        User::create([
     //            'name' => 'AnaPaula',
     //            'email' => '*****@*****.**',
     //            'password' => \Illuminate\Support\Facades\Hash::make(123456),
     //            'is_admin' => 0
     //        ]);
     //        User::create([
     //            'name' => 'Bruno Prado',
     //            'email' => '*****@*****.**',
     //            'password' => \Illuminate\Support\Facades\Hash::make(123456)
     //        ]);
     //factory('CodeCommerce\User', 10)->create();
 }
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        DB::table('users')->truncate();

        User::create([
            'name' => 'Henrique',
            'email' => '*****@*****.**',
            'password' => Hash::make(123456),
            'is_admin' => 1
        ]);

        User::create([
            'name' => 'Cliente 1',
            'email' => '*****@*****.**',
            'password' => Hash::make(123456),
            'is_admin' => 0
        ]);

        User::create([
            'name' => 'Cliente 2',
            'email' => '*****@*****.**',
            'password' => Hash::make(123456),
            'is_admin' => 0
        ]);

        factory('CodeCommerce\User', 10)->create();


//        $faker = Faker::create();
//
//        foreach (range(1, 10) as $i) {
//            User::create([
//                'name' => $faker->name(),
//                'email' => $faker->email(),
//                'password' => Hash::make($faker->word)
//            ]);
//        }


    }
 public function run()
 {
     DB::table('users')->truncate();
     User::create(['name' => 'Hilton Figueiredo', 'email' => '*****@*****.**', 'password' => Hash::make(123)]);
     factory('CodeCommerce\\User', 15)->create();
 }
 public function orders()
 {
     $user = User::find(Auth::user()->id);
     $orders = $user->orders;
     return view('store.orders', compact('orders'));
 }
 /**
  * Create a new user instance after a valid registration.
  *
  * @param  array  $data
  * @return User
  */
 protected function create(array $data)
 {
     return User::create(['name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password']), 'logradouro' => $data['logradouro'], 'numero' => $data['numero'], 'bairro' => $data['bairro'], 'cidade' => $data['cidade'], 'uf' => $data['uf'], 'cep' => $data['cep']]);
 }
 public function run()
 {
     DB::table('users')->truncate();
     factory('CodeCommerce\\User', 15)->create();
     \CodeCommerce\User::create(['name' => "Nilton", 'email' => "*****@*****.**", 'password' => \Illuminate\Support\Facades\Hash::make(123456), 'is_admin' => 1, 'cep' => "45690000", 'address' => "Rua teste", 'number' => "200", 'district' => "Centro", 'city' => "Ilhéus", 'state' => "Bahia"]);
 }
 public function run()
 {
     DB::table('users')->truncate();
     User::create(['name' => 'Administrador', 'email' => '*****@*****.**', 'password' => bcrypt('123456')]);
 }
 /**
  * Create a new user instance after a valid registration.
  *
  * @param  array  $data
  * @return User
  */
 protected function create(array $data)
 {
     return User::create(['name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password'])]);
 }
Beispiel #16
0
 /**
  * Create a new user instance after a valid registration.
  *
  * @param  array  $data
  * @return User
  */
 protected function create(array $data)
 {
     return User::create(['name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password']), 'street' => $data['street'], 'number' => $data['number'], 'complement' => $data['complement'], 'neighborh' => $data['neighborh'], 'city' => $data['city'], 'uf' => $data['uf'], 'cep' => $data['cep'], 'phone' => $data['phone']]);
 }
 /**
  * Create a new user instance after a valid registration.
  *
  * @param  array  $data
  * @return User
  */
 protected function create(array $data)
 {
     $user = User::create(['name' => $data['name'], 'cpf' => $data['cpf'], 'fone' => $data['fone'], 'email' => $data['email'], 'password' => bcrypt($data['password'])]);
     return $user;
 }
 /**
  * Create a new user instance after a valid registration.
  *
  * @param  array  $data
  * @return User
  */
 protected function create(array $data)
 {
     return User::create(['name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password']), 'address' => $data['address'], 'number' => $data['number'], 'neighborhood' => $data['neighborhood'], 'city' => $data['city'], 'zip' => $data['zip'], 'state' => $data['state']]);
 }
 /**
  * Create a new user instance after a valid registration.
  *
  * @param  array  $data
  * @return User
  */
 protected function create(array $data)
 {
     return User::create(['name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password']), 'street' => $data['street'], 'number' => $data['number'], 'city' => $data['city'], 'state' => $data['state'], 'country' => $data['country'], 'zip' => $data['zip']]);
 }
 public function index()
 {
     $usuarios = User::all();
     dd($usuarios);
 }
Beispiel #21
0
 /**
  * Create a new user instance after a valid registration.
  *
  * @param  array  $data
  * @return User
  */
 protected function create(array $data)
 {
     return User::create(['name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password']), 'address_cep' => $data['address_cep'], 'address_location' => $data['address_location'], 'address_number' => $data['address_number'], 'address_neighborhood' => $data['address_neighborhood'], 'address_city' => $data['address_city'], 'address_state' => $data['address_state']]);
 }
 /**
  * Create a new user instance after a valid registration.
  *
  * @param  array  $data
  * @return User
  */
 protected function create(array $data)
 {
     return User::create(['name' => $data['name'], 'email' => $data['email'], 'end_logradouro' => $data['end_logradouro'], 'end_numero' => $data['end_numero'], 'end_complemento' => $data['end_complemento'], 'end_bairro' => $data['end_bairro'], 'end_cidade' => $data['end_cidade'], 'end_uf' => $data['end_uf'], 'end_cep' => $data['end_cep'], 'password' => bcrypt($data['password'])]);
 }
 public function run()
 {
     User::truncate();
     factory('CodeCommerce\\User')->create(['name' => 'Marcus David', 'email' => '*****@*****.**', 'password' => bcrypt('123456'), 'remember_token' => str_random(10)]);
     factory(User::class, 5)->create();
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     DB::table('users')->truncate();
     /*factory('CodeCommerce\User',1)->create();*/
     User::create(['name' => 'maycon', 'fone' => '(48)3333-3333', 'cpf' => '999.999.9999-99', 'email' => '*****@*****.**', 'password' => Hash::make(123456), 'is_admin' => 1]);
 }
 /**
  * Create a new user instance after a valid registration.
  *
  * @param  array  $data
  * @return User
  */
 protected function create(array $data)
 {
     return User::create(['name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password']), 'endereco' => $data['endereco'], 'numero' => $data['numero'], 'complemento' => $data['complemento'], 'bairro' => $data['bairro'], 'cidade' => $data['cidade'], 'estado' => $data['estado'], 'cep' => $data['cep']]);
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     User::truncate();
     factory(User::class, 5)->create();
 }