Example #1
0
 /**
 * Method Name :Store
 * Insert data to User Table and consequencesly insert to Account, Carries and Downline table
 *
 *
 */
 public function store(UserRegRequest $request, User $user)
 {
     $uplineUser = User::where('username', $request->upline_id)->first();
     $referrarUser = User::where('username', $request->referrar_id)->first();
     $uplineId = $uplineUser->id;
     $requestValue = $request->placement;
     // return $request->full_name . "++". preg_replace('/\s+/', '', strtolower($request->username));
     // $username =
     $address = $request->address1 . "," . $request->address2;
     // return
     $user->insert([['username' => preg_replace('/\\s+/', '', strtolower($request->username)), 'full_name' => $request->full_name, 'gender' => $request->gender, 'email' => $request->email, 'password' => bcrypt($request->password), 'remember_token' => $request->_token, 'address' => $address, 'phone_number' => $request->phone_number, 'country' => $request->country, 'account_no' => 555210, 'referrar_id' => $referrarUser->id, 'upline_id' => $uplineUser->id, 'pin' => rand(1, 99999999), 'signup_date' => Carbon::now(), 'last_login_time' => Carbon::now()]]);
     $lastRegUser = $user->where('username', preg_replace('/\\s+/', '', strtolower($request->username)))->first();
     $role = Role::where('id', 3)->first();
     $lastRegUser->assign($role);
     Account::insert(['balance' => 0, 'roi_balance' => 0, 'user_id' => $lastRegUser->id, 'acc_type' => '0']);
     Carry::insert(['user_id' => $lastRegUser->id, 'left_carry' => 0, 'right_carry' => 0, 'matching_qualify' => 0]);
     Downline::insert(['user_id' => $lastRegUser->id, 'left_member_id' => 0, 'right_member_id' => 0]);
     /*Downline::where('user_id', $uplineUser->id)
       ->update(['right_member_id' => $request->placement]);*/
     /*return $downLineTable = Downline::where('user_id', $uplineId)->first();
       if($downLineTable->left_member_id == 0 && $request->placement != 'right'){
                   Downline::where('user_id', $uplineUser->id)
                               ->update(['left_member_id' => $lastRegUser->id]);  
               }
       else
               {
                  Downline::where('user_id', $uplineUser->id)
                   ->update(['right_member_id' => $lastRegUser->id]); 
               }
               */
     $position = preg_replace('/\\s+/', '', strtolower($requestValue)) . "_member_id";
     Downline::where('user_id', $uplineUser->id)->update([$position => $lastRegUser->id]);
     return redirect()->back();
 }
Example #2
0
 public function run()
 {
     Category::create(array('id' => 1, 'category' => 'TestParent'));
     Category::create(array('id' => 2, 'category' => 'TestChild', 'parent_id' => 1));
     User::insert(array('name' => 'joe', 'email' => '*****@*****.**', 'password' => 'adasdas'));
     \Kevupton\Bookings\Models\Equipment::insert(array('name' => 'Chairs', 'longitude' => 0, 'latitude' => 0, 'address' => 'yoyo', 'qty' => 100));
     \Kevupton\Bookings\Models\Classification::insert(array('code' => 'PG', 'name' => 'Parental Guidance'));
     $event = \Kevupton\Bookings\Models\Event::create(array('name' => 'How', 'category_id' => 2, 'classification_code' => 'PG'));
     $insert = \Kevupton\Bookings\Models\Venue::create(array('name' => 'SmartVille', 'is_bookable' => 1, 'longitude' => 0, 'latitude' => 0, 'address' => 'Wowo', 'capacity' => 100));
     $timetable = $insert->timetable()->create(array());
     foreach (TimetableDayRepository::daysOfWeek() as $day) {
         ${$day} = $timetable->days()->create(array('day' => $day, 'from' => '07:01:00', 'to' => '09:01:01'));
     }
     $MONDAY->to = '24:00:00.000000';
     $MONDAY->save();
     $TUESDAY->from = '00:00:00.000000';
     $TUESDAY->to = '24:00:00.000000';
     $TUESDAY->save();
     $WEDNESDAY->from = '00:00:00.000000';
     $WEDNESDAY->to = '24:00:00.000000';
     $WEDNESDAY->save();
     $THURSDAY->from = '00:00:00.000000';
     $THURSDAY->save();
     $timetable->specifics()->create(array('is_available' => 1, 'from' => '2017-02-01 09:01:01', 'to' => '2017-03-01 09:01:01'));
     Session::create(array('event_id' => $event->id, 'venue_id' => $insert->id, 'duration' => 60, 'timetable_id' => $timetable->id, 'from' => '2017-02-01 09:01:01', 'to' => '2017-03-01 09:01:01', 'name' => 'pinokio'));
     Session::create(array('event_id' => $event->id, 'venue_id' => $insert->id, 'duration' => 120, 'timetable_id' => $timetable->id, 'from' => '2017-02-01 08:01:01', 'to' => '2017-02-01 08:31:01', 'name' => 'pinokio2'));
     \Kevupton\Bookings\Models\SessionEquipment::insert(array(array('session_id' => 1, 'equipment_id' => 1, 'qty' => 10), array('session_id' => 2, 'equipment_id' => 1, 'qty' => 50)));
     \Kevupton\Bookings\Models\SessionItem::insert(array(array('session_id' => 1, 'name' => "GOLD Ticket", 'price' => 10000, 'qty' => 100), array('session_id' => 2, 'name' => "GOLD Ticket", 'price' => 10000, 'qty' => 100)));
     \Kevupton\Bookings\Models\Ticket::insert(array('session_item_id' => 1, 'user_id' => 1));
     \Kevupton\Bookings\Models\VenueEquipment::insert(array('venue_id' => 1, 'equipment_id' => 1));
 }
Example #3
0
 public function run()
 {
     Korisnici::insert([['username' => 'admin', 'password' => bcrypt('admin'), 'email' => '*****@*****.**', 'prava_pristupa_id' => 5, 'foto' => '/img/kontakt/korisnik-5.jpg', 'aktivan' => 1, 'grad_id' => 3, 'telefon' => '065098765', 'ime' => 'Админ', 'prezime' => 'Админовић'], ['username' => 'moderator', 'password' => bcrypt('moderator'), 'email' => '*****@*****.**', 'prava_pristupa_id' => 4, 'foto' => '/img/kontakt/korisnik-4.jpg', 'aktivan' => 1, 'grad_id' => 3, 'telefon' => '062345678', 'ime' => 'Модератор', 'prezime' => 'Модератовић'], ['username' => 'korisnik', 'password' => bcrypt('korisnik'), 'email' => '*****@*****.**', 'prava_pristupa_id' => 2, 'foto' => '/img/kontakt/korisnik-3.jpg', 'aktivan' => 1, 'grad_id' => 2, 'telefon' => '061234567', 'ime' => 'Корисник', 'prezime' => 'Корисниковић'], ['username' => 'zabranjen', 'password' => bcrypt('zabranjen'), 'email' => '*****@*****.**', 'prava_pristupa_id' => 2, 'foto' => '', 'aktivan' => 1, 'grad_id' => 3, 'telefon' => '0634567890', 'ime' => 'Забрањен', 'prezime' => 'Забрањеновић']]);
     Udruzenje::insert([['vrsta_udruzenja_id' => 1, 'naziv' => 'Савез гуслара Србије', 'slug' => 'savez-guslara-srbije', 'korisnici_id' => 2, 'grad_id' => 2, 'datum_osnivanja' => '2000-05-23'], ['vrsta_udruzenja_id' => 1, 'naziv' => 'Савез гуслара Републике Српске', 'slug' => 'savez-guslara-republike-srpske', 'korisnici_id' => 2, 'grad_id' => 3, 'datum_osnivanja' => '1989-11-18'], ['vrsta_udruzenja_id' => 1, 'naziv' => 'Савез gуслара "Душаново царство"', 'slug' => 'savez-guslara-dusanovo-carstvo', 'korisnici_id' => 2, 'grad_id' => 4, 'datum_osnivanja' => '2005-10-22']]);
     Udruzenje::insert([['vrsta_udruzenja_id' => 0, 'naziv' => '"Стара Херцеговина" Београд', 'slug' => 'stara-hercegovina-beograd', 'opis' => '"Стара Херцеговина" Београд "Стара Херцеговина" Београд "Стара Херцеговина" Београд "Стара Херцеговина" Београд "Стара Херцеговина" Београд "Стара Херцеговина" Београд ', 'savez_id' => 2, 'korisnici_id' => 2, 'grad_id' => 2, 'datum_osnivanja' => '1988-02-28'], ['vrsta_udruzenja_id' => 0, 'naziv' => '"Јован Чепић" Земун', 'slug' => 'jovan-cepic-zemun', 'opis' => '"Јован Чепић" Земун "Јован Чепић" Земун "Јован Чепић" Земун "Јован Чепић" Земун "Јован Чепић" Земун "Јован Чепић" Земун', 'savez_id' => 2, 'korisnici_id' => 2, 'grad_id' => 2, 'datum_osnivanja' => '2011-06-30'], ['vrsta_udruzenja_id' => 0, 'naziv' => '"Бајо Пивљанин" Земун', 'slug' => 'bajo-pivljanin-zemun', 'opis' => '"Бајо Пивљанин" Земун "Бајо Пивљанин" Земун "Бајо Пивљанин" Земун "Бајо Пивљанин" Земун "Бајо Пивљанин" Земун "Бајо Пивљанин" Земун "Бајо Пивљанин" Земун', 'savez_id' => 2, 'korisnici_id' => 2, 'grad_id' => 2, 'datum_osnivanja' => '1955-05-21'], ['vrsta_udruzenja_id' => 0, 'naziv' => '"Мајор Милан Тепић" Београд', 'slug' => 'major-milan-tepic-beograd', 'opis' => '"Мајор Милан Тепић" Београд "Мајор Милан Тепић" Београд "Мајор Милан Тепић" Београд "Мајор Милан Тепић" Београд "Мајор Милан Тепић" Београд "Мајор Милан Тепић" Београд "Мајор Милан Тепић" Београд ', 'savez_id' => 3, 'korisnici_id' => 2, 'grad_id' => 2, 'datum_osnivanja' => '2000-11-16'], ['vrsta_udruzenja_id' => 0, 'naziv' => '"Старина Новак" Пале', 'slug' => 'starina-novak-pale', 'opis' => '"Старина Новак" Пале "Старина Новак" Пале "Старина Новак" Пале "Старина Новак" Пале "Старина Новак" Пале "Старина Новак" Пале "Старина Новак" Пале "Старина Новак" Пале ', 'savez_id' => 3, 'korisnici_id' => 2, 'grad_id' => 2, 'datum_osnivanja' => '1892-07-13'], ['vrsta_udruzenja_id' => 0, 'naziv' => '"Војвода Мина Радовић" Подгорица', 'slug' => 'vojvoda-mina-radovic-podgorica', 'opis' => '"Војвода Мина Радовић" Подгорица "Војвода Мина Радовић" Подгорица "Војвода Мина Радовић" Подгорица "Војвода Мина Радовић" Подгорица "Војвода Мина Радовић" Подгорица "Војвода Мина Радовић" Подгорица "Војвода Мина Радовић" Подгорица ', 'savez_id' => 4, 'korisnici_id' => 2, 'grad_id' => 2, 'datum_osnivanja' => '1998-03-25']]);
     DrustveniKorisnik::insert([['udruzenje_id' => 2, 'korisnici_id' => 3], ['udruzenje_id' => 3, 'korisnici_id' => 4], ['udruzenje_id' => 1, 'korisnici_id' => 5]]);
 }
Example #4
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $faker = Faker::create('pt_PT');
     User::insert(array('nickname' => "user", 'email' => "*****@*****.**", 'password' => bcrypt("123"), 'remember_token' => str_random(10)));
     for ($i = 0; $i < 5; $i++) {
         User::insert(array('nickname' => $faker->unique()->numerify('User ###'), 'email' => $faker->email, 'password' => bcrypt("123")));
     }
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     //delete
     User::truncate();
     //Insert
     User::insert([['name' => 'admin', 'email' => '*****@*****.**', 'password' => Hash::make('admin'), 'role' => 'admin', 'confirmed_at' => Carbon::now()]]);
     //Insert
     User::insert([['name' => 'user', 'email' => '*****@*****.**', 'password' => Hash::make('user'), 'role' => 'user', 'confirmed_at' => Carbon::now()]]);
 }
Example #6
0
 public function store(Request $request)
 {
     $allRequest = $request->all();
     $userName = $allRequest['username'];
     $sex = $allRequest['sex'];
     $dataInsertToDatabase = array('username' => $userName, 'sex' => $sex);
     $objUser = new User();
     $objUser->insert($dataInsertToDatabase);
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     DB::statement('SET FOREIGN_KEY_CHECKS=0;');
     DB::table('users')->truncate();
     DB::statement('SET FOREIGN_KEY_CHECKS=1;');
     User::where('username', 'admin')->delete();
     User::insert(array('name' => 'admin', 'email' => '*****@*****.**', 'username' => 'admin', 'password' => Hash::make('noisyboy')));
     // $admin = User::where('username', 'admin')->first();
     // $admin->roles()->attach(1);
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $faker = \Faker\Factory::create();
     User::truncate();
     //        DB::table('users')->insert([
     User::insert([['name' => 'Kenn E. Thompson', 'email' => '*****@*****.**', 'password' => bcrypt('abc123'), 'created_at' => new DateTime(), 'updated_at' => new DateTime()]]);
     foreach (range(1, 99) as $index) {
         User::insert(['name' => $faker->name, 'email' => $faker->email, 'password' => bcrypt('secret'), 'created_at' => dateTime($max = 'now'), 'updated_at' => dateTime($max = 'now')]);
     }
 }
Example #9
0
 public function run()
 {
     PravaPristupa::insert([['naziv' => 'Забрањен приступ'], ['naziv' => 'Корисник'], ['naziv' => 'Нижи модератор'], ['naziv' => 'Модератор'], ['naziv' => 'Администратор'], ['naziv' => 'Супер администратор']]);
     Grad::insert([['naziv' => 'Недефинисан'], ['naziv' => 'Београд'], ['naziv' => 'Краљево'], ['naziv' => 'Фоча']]);
     VrstaKorisnika::insert([['naziv' => 'Посетилац портала'], ['naziv' => 'Гуслар'], ['naziv' => 'Градитељ гусала'], ['naziv' => 'Фрулаш'], ['naziv' => 'Градитељ фрула'], ['naziv' => 'Градитељ дувачких инструмената'], ['naziv' => 'Дуборезац']]);
     Korisnici::insert([['username' => 'SuperAdmin', 'password' => bcrypt('SuperAdmin'), 'email' => '*****@*****.**', 'prava_pristupa_id' => 6, 'foto' => '/img/kontakt/korisnik-6.jpg', 'aktivan' => 1, 'grad_id' => 2, 'telefon' => '065123456', 'ime' => 'Супер', 'prezime' => 'Фаца']]);
     VrstaProizvoda::insert([['naziv' => 'Гусле', 'slug' => 'gusle'], ['naziv' => 'Дувачки инструменти', 'slug' => 'duvacki-insrumenti'], ['naziv' => 'Иконе', 'slug' => 'ikone'], ['naziv' => 'Народне ношње', 'slug' => 'narodne-nosnje'], ['naziv' => 'Радови у флаши', 'slug' => 'radovi-u-flasi'], ['naziv' => 'Дуборез за ловце', 'slug' => 'duborez-za-lovce'], ['naziv' => 'Сувенири', 'slug' => 'suveniri'], ['naziv' => 'Остало', 'slug' => 'ostalo']]);
     StanjeOglasa::insert([['naziv' => 'Активан'], ['naziv' => 'Резервисан'], ['naziv' => 'У фази испоруке'], ['naziv' => 'Продат']]);
     StanjeProizvoda::insert([['naziv' => 'Ново'], ['naziv' => 'Некориштен'], ['naziv' => 'Полован без оштећења'], ['naziv' => 'Полован са видљивим знацима кориштења'], ['naziv' => 'Неисправан']]);
     Galerija::insert([['naziv' => 'Недефинисано'], ['naziv' => 'Портфолио']]);
     VrstaSadrzaja::insert([['naziv' => 'Фотографија'], ['naziv' => 'Видео']]);
     Udruzenje::insert([['vrsta_udruzenja_id' => 1, 'naziv' => 'Самостално друштво', 'grad_id' => 1, 'korisnici_id' => 1]]);
 }
Example #10
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request $request
  * @return \Illuminate\Http\Response
  */
 public function store(Request $request)
 {
     $username = $request->input('username');
     $password = $request->input('password');
     $email = $request->input('email');
     $avatar = $request->input('avatar');
     $querySucceeded = User::insert(['username' => $username, 'password' => $password, 'email_address' => $email, 'avatar' => $avatar]);
     if ($querySucceeded) {
         $returnValue['status'] = 200;
         $returnValue['message'] = 'OK';
         return Response::json($returnValue, 200);
     }
     $returnValue['status'] = 400;
     $returnValue['error_message'] = 'An error occurred while trying to store new user.';
     return Response::json($returnValue, 400);
 }
Example #11
0
 public function register(RegisterRequest $request)
 {
     if (!is_null($request->_error)) {
         return view("dangky", array('errors' => $request->_error));
     }
     $email = $request->email;
     $password = $request->password;
     $fullname = $request->name;
     $birthday = $request->birthday;
     $array = ['email' => $email, 'password' => password_hash($password, PASSWORD_DEFAULT), 'name' => $fullname, 'birthday' => $birthday, 'permission_id' => 1, 'registration_at' => 'local', 'root_status' => 0];
     $model = new User();
     if ($model->insert($array) === true) {
         redirect('');
     }
     redirect('dangky');
 }
Example #12
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     User::truncate();
     $data = [['first_name' => 'admin', 'last_name' => 'admin', 'email' => '*****@*****.**', 'username' => 'admin', 'password' => \Hash::make('123456'), 'birthday' => '1990-11-11', 'role_id' => 1, 'address' => 'address address', 'phone' => '123456'], ['first_name' => 'staff', 'last_name' => 'staff', 'email' => '*****@*****.**', 'username' => 'staff', 'password' => \Hash::make('123456'), 'birthday' => '1990-11-11', 'role_id' => 2, 'address' => 'address address', 'phone' => '123456'], ['first_name' => 'member', 'last_name' => 'member', 'email' => '*****@*****.**', 'username' => 'member', 'password' => \Hash::make('123456'), 'birthday' => '1990-11-11', 'role_id' => 3, 'address' => 'address address', 'phone' => '123456'], ['first_name' => '1', 'last_name' => '1', 'email' => '*****@*****.**', 'username' => 'lao1', 'password' => \Hash::make('123456'), 'birthday' => '1990-11-11', 'role_id' => 3, 'address' => 'address address', 'phone' => '123456'], ['first_name' => '1', 'last_name' => '1', 'email' => '*****@*****.**', 'username' => 'lao2', 'password' => \Hash::make('123456'), 'birthday' => '1990-11-11', 'role_id' => 3, 'address' => 'address address', 'phone' => '123456'], ['first_name' => '1', 'last_name' => '1', 'email' => '*****@*****.**', 'username' => 'lao3', 'password' => \Hash::make('123456'), 'birthday' => '1990-11-11', 'role_id' => 3, 'address' => 'address address', 'phone' => '123456'], ['first_name' => '1', 'last_name' => '1', 'email' => '*****@*****.**', 'username' => 'lao4', 'password' => \Hash::make('123456'), 'birthday' => '1990-11-11', 'role_id' => 3, 'address' => 'address address', 'phone' => '123456'], ['first_name' => '1', 'last_name' => '1', 'email' => '*****@*****.**', 'username' => 'lao5', 'password' => \Hash::make('123456'), 'birthday' => '1990-11-11', 'role_id' => 3, 'address' => 'address address', 'phone' => '123456'], ['first_name' => '1', 'last_name' => '1', 'email' => '*****@*****.**', 'username' => 'ngo1', 'password' => \Hash::make('123456'), 'birthday' => '1990-11-11', 'role_id' => 3, 'address' => 'address address', 'phone' => '123456'], ['first_name' => '1', 'last_name' => '1', 'email' => '*****@*****.**', 'username' => 'ngo2', 'password' => \Hash::make('123456'), 'birthday' => '1990-11-11', 'role_id' => 3, 'address' => 'address address', 'phone' => '123456'], ['first_name' => '1', 'last_name' => '1', 'email' => '*****@*****.**', 'username' => 'ngo3', 'password' => \Hash::make('123456'), 'birthday' => '1990-11-11', 'role_id' => 3, 'address' => 'address address', 'phone' => '123456'], ['first_name' => '1', 'last_name' => '1', 'email' => '*****@*****.**', 'username' => 'ngo4', 'password' => \Hash::make('123456'), 'birthday' => '1990-11-11', 'role_id' => 3, 'address' => 'address address', 'phone' => '123456'], ['first_name' => '1', 'last_name' => '1', 'email' => '*****@*****.**', 'username' => 'ngo5', 'password' => \Hash::make('123456'), 'birthday' => '1990-11-11', 'role_id' => 3, 'address' => 'address address', 'phone' => '123456'], ['first_name' => '1', 'last_name' => '1', 'email' => '*****@*****.**', 'username' => 'rua1', 'password' => \Hash::make('123456'), 'birthday' => '1990-11-11', 'role_id' => 3, 'address' => 'address address', 'phone' => '123456'], ['first_name' => '1', 'last_name' => '1', 'email' => '*****@*****.**', 'username' => 'rua2', 'password' => \Hash::make('123456'), 'birthday' => '1990-11-11', 'role_id' => 3, 'address' => 'address address', 'phone' => '123456'], ['first_name' => '1', 'last_name' => '1', 'email' => '*****@*****.**', 'username' => 'rua3', 'password' => \Hash::make('123456'), 'birthday' => '1990-11-11', 'role_id' => 3, 'address' => 'address address', 'phone' => '123456'], ['first_name' => '1', 'last_name' => '1', 'email' => '*****@*****.**', 'username' => 'rua4', 'password' => \Hash::make('123456'), 'birthday' => '1990-11-11', 'role_id' => 3, 'address' => 'address address', 'phone' => '123456'], ['first_name' => '1', 'last_name' => '1', 'email' => '*****@*****.**', 'username' => 'rua5', 'password' => \Hash::make('123456'), 'birthday' => '1990-11-11', 'role_id' => 3, 'address' => 'address address', 'phone' => '123456'], ['first_name' => '1', 'last_name' => '1', 'email' => '*****@*****.**', 'username' => 'chip1', 'password' => \Hash::make('123456'), 'birthday' => '1990-11-11', 'role_id' => 3, 'address' => 'address address', 'phone' => '123456'], ['first_name' => '1', 'last_name' => '1', 'email' => '*****@*****.**', 'username' => 'chip2', 'password' => \Hash::make('123456'), 'birthday' => '1990-11-11', 'role_id' => 3, 'address' => 'address address', 'phone' => '123456'], ['first_name' => '1', 'last_name' => '1', 'email' => '*****@*****.**', 'username' => 'chip3', 'password' => \Hash::make('123456'), 'birthday' => '1990-11-11', 'role_id' => 3, 'address' => 'address address', 'phone' => '123456'], ['first_name' => '1', 'last_name' => '1', 'email' => '*****@*****.**', 'username' => 'chip4', 'password' => \Hash::make('123456'), 'birthday' => '1990-11-11', 'role_id' => 3, 'address' => 'address address', 'phone' => '123456'], ['first_name' => '1', 'last_name' => '1', 'email' => '*****@*****.**', 'username' => 'chip5', 'password' => \Hash::make('123456'), 'birthday' => '1990-11-11', 'role_id' => 3, 'address' => 'address address', 'phone' => '123456'], ['first_name' => '1', 'last_name' => '1', 'email' => '*****@*****.**', 'username' => 'mem1', 'password' => \Hash::make('123456'), 'birthday' => '1990-11-11', 'role_id' => 3, 'address' => 'address address', 'phone' => '123456'], ['first_name' => '1', 'last_name' => '1', 'email' => '*****@*****.**', 'username' => 'mem2', 'password' => \Hash::make('123456'), 'birthday' => '1990-11-11', 'role_id' => 3, 'address' => 'address address', 'phone' => '123456'], ['first_name' => '1', 'last_name' => '1', 'email' => '*****@*****.**', 'username' => 'mem3', 'password' => \Hash::make('123456'), 'birthday' => '1990-11-11', 'role_id' => 3, 'address' => 'address address', 'phone' => '123456'], ['first_name' => '1', 'last_name' => '1', 'email' => '*****@*****.**', 'username' => 'mem4', 'password' => \Hash::make('123456'), 'birthday' => '1990-11-11', 'role_id' => 3, 'address' => 'address address', 'phone' => '123456'], ['first_name' => '1', 'last_name' => '1', 'email' => '*****@*****.**', 'username' => 'mem5', 'password' => \Hash::make('123456'), 'birthday' => '1990-11-11', 'role_id' => 3, 'address' => 'address address', 'phone' => '123456'], ['first_name' => '1', 'last_name' => '1', 'email' => '*****@*****.**', 'username' => 'a1', 'password' => \Hash::make('123456'), 'birthday' => '1990-11-11', 'role_id' => 3, 'address' => 'address address', 'phone' => '123456'], ['first_name' => '1', 'last_name' => '1', 'email' => '*****@*****.**', 'username' => 'a0', 'password' => \Hash::make('123456'), 'birthday' => '1990-11-11', 'role_id' => 3, 'address' => 'address address', 'phone' => '123456'], ['first_name' => '1', 'last_name' => '1', 'email' => '*****@*****.**', 'username' => 'a3', 'password' => \Hash::make('123456'), 'birthday' => '1990-11-11', 'role_id' => 3, 'address' => 'address address', 'phone' => '123456'], ['first_name' => '1', 'last_name' => '1', 'email' => '*****@*****.**', 'username' => 'liem1234', 'password' => \Hash::make('123456'), 'birthday' => '1990-11-11', 'role_id' => 3, 'address' => 'address address', 'phone' => '123456'], ['first_name' => '1', 'last_name' => '1', 'email' => '*****@*****.**', 'username' => 'test', 'password' => \Hash::make('123456'), 'birthday' => '1990-11-11', 'role_id' => 3, 'address' => 'address address', 'phone' => '123456'], ['first_name' => '1', 'last_name' => '1', 'email' => '*****@*****.**', 'username' => 'a', 'password' => \Hash::make('123456'), 'birthday' => '1990-11-11', 'role_id' => 3, 'address' => 'address address', 'phone' => '123456'], ['first_name' => '1', 'last_name' => '1', 'email' => '*****@*****.**', 'username' => 'liem12345', 'password' => \Hash::make('123456'), 'birthday' => '1990-11-11', 'role_id' => 3, 'address' => 'address address', 'phone' => '123456'], ['first_name' => '1', 'last_name' => '1', 'email' => '*****@*****.**', 'username' => 'thaithai', 'password' => \Hash::make('123456'), 'birthday' => '1990-11-11', 'role_id' => 3, 'address' => 'address address', 'phone' => '123456'], ['first_name' => '1', 'last_name' => '1', 'email' => '*****@*****.**', 'username' => 'thaihv', 'password' => \Hash::make('123456'), 'birthday' => '1990-11-11', 'role_id' => 3, 'address' => 'address address', 'phone' => '123456']];
     User::insert($data);
     // Fake data
     // $faker = Faker\Factory::create();
     // foreach (range(10,30) as $index) {
     //     User::create([
     //         'first_name'=>$faker->name,
     //         'last_name'=>$faker->name,
     //         'username'=>$faker->name,
     //         'password'=>Hash::make('123456'),
     //         'email'=>$faker->email,
     //         'role_id'=>3,
     //         ]);
     // }
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $faker = Faker::create();
     $user = new User();
     $user->name = 'AdminMov';
     $user->apellido_paterno = 'Ap admin';
     $user->confirmado = 1;
     $user->codigo_confirmacion = str_random();
     $user->tipo_usuario = 'administrador';
     $user->email = '*****@*****.**';
     $user->avatar = 'avatar.jpg';
     $user->password = '******';
     $user->save();
     $samples_temp = [];
     for ($i = 0; $i < 150; $i++) {
         $samples_temp[] = ['name' => $faker->firstName, 'apellido_paterno' => $faker->lastName, 'confirmado' => $faker->numberBetween($min = 0, $max = 1), 'codigo_confirmacion' => str_random(), 'tipo_usuario' => 'usuario', 'email' => $faker->unique->email, 'avatar' => 'avatar.jpg', 'password' => bcrypt('secret')];
     }
     User::insert($samples_temp);
 }
Example #14
0
 public function simpansekolah($request)
 {
     $nama = $request->input('nama');
     $jenjang = $request->input('jenjang');
     $alamat = $request->input('alamat');
     $kota = $request->input('kota');
     $provinsi = $request->input('provinsi');
     $nomor_pokok = $request->input('nomor_pokok');
     $username = $request->input('username');
     $email = $request->input('email');
     $password = $request->input('password');
     $gambar = $request->file('gambar');
     Users::insert(['username' => $username, 'display_name' => $nama, 'email' => $email, 'password' => bcrypt($password), 'role' => 'sekolah', 'confirmed' => true, 'confirmation_code' => md5(microtime() . env('APP_KEY'))]);
     $id = Users::where('username', $username)->first()->id;
     Schools::insert(['user_id' => $id, 'nama_sekolah' => $nama, 'jenjang' => $jenjang, 'alamat' => $alamat, 'kota' => $kota, 'provinsi' => $provinsi, 'nomor_pokok' => $nomor_pokok, 'created_at' => date('Y-m-d h:i:sa'), 'updated_at' => date('Y-m-d h:i:sa')]);
     if ($gambar !== null) {
         $filename = $id;
         $upload_folder = '/img/sekolah/';
         $gambar->move(public_path() . $upload_folder, $filename . '.jpg');
     }
     return redirect('auth/login');
 }
Example #15
0
 public function StoreRegister()
 {
     $date = date("d-m-Y H:i:s", strtotime('+3 hours'));
     $user = User::where('username', Input::get('username'))->first();
     $email = User::where('email', Input::get('email'))->first();
     if (count($user) == 0 && count($email) == 0) {
         if (Input::get('username') && Input::get('email') && Input::get('password') && filter_var(Input::get('email'), FILTER_VALIDATE_EMAIL)) {
             User::insert(array('username' => Input::get('username'), 'email' => Input::get('email'), 'password' => Hash::make(Input::get('password')), 'date_registered' => $date));
             return Response::json(['success' => 'request succeeded'], 200);
         }
     }
     if (count($user) != 0 && count($email) != 0) {
         return Response::json(['success' => 'request failed'], 406);
     }
     if (count($user) != 0) {
         return Response::json(['success' => 'request failed'], 404);
     }
     if (count($email) != 0) {
         return Response::json(['success' => 'request failed'], 405);
     }
     if (!filter_var(Input::get('email'), FILTER_VALIDATE_EMAIL)) {
         return Response::json(['success' => 'request failed'], 400);
     }
 }
Example #16
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     User::truncate();
     User::insert([['name' => 'admin', 'email' => '*****@*****.**', 'password' => bcrypt('1q2w3e4r'), 'remember_token' => str_random(10), 'is_admin' => true], ['name' => 'user', 'email' => '*****@*****.**', 'password' => bcrypt('1q2w3e4r'), 'remember_token' => str_random(10), 'is_admin' => false]]);
 }
Example #17
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $data = array(['name' => 'Herly', 'last_name' => 'olivares', 'email' => '*****@*****.**', 'user' => 'herly', 'password' => \Hash::make('123456'), 'type' => 'admin', 'active' => 1, 'address' => 'San Cosme 290, Cuauhtemoc, D.F.', 'created_at' => new DateTime(), 'updated_at' => new DateTime()], ['name' => 'Argelia', 'last_name' => 'Sanchez', 'email' => '*****@*****.**', 'user' => 'arge', 'password' => \Hash::make('123456'), 'type' => 'user', 'active' => 1, 'address' => 'Tonala 321, Jalisco', 'created_at' => new DateTime(), 'updated_at' => new DateTime()]);
     User::insert($data);
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     Model::unguard();
     User::insert([['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx'], ['username' => 'User-' . rand(1, 20), 'first_name' => 'John', 'last_name' => 'Doe', 'avatar_url' => 'https://www.google.lt/images/srpr/logo11w.png', 'gender' => 'male', 'email' => 'test@test' . rand(1, 10000) . '.com', 'password' => 'xxx']]);
 }
Example #19
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $data = array(['name' => 'Melissa', 'last_name' => 'Arias', 'email' => '*****@*****.**', 'user' => 'meliaa', 'password' => \Hash::make('12345678'), 'type' => 'admin', 'active' => 1, 'address' => 'Tibas', 'created_at' => new DateTime(), 'updated_at' => new DateTime()], ['name' => 'Ronald', 'last_name' => 'Retana', 'email' => '*****@*****.**', 'user' => 'ronret', 'password' => \Hash::make('12345678'), 'type' => 'user', 'active' => 1, 'address' => 'Tres Rios', 'created_at' => new DateTime(), 'updated_at' => new DateTime()], ['name' => 'Larissa', 'last_name' => 'Pineda', 'email' => '*****@*****.**', 'user' => 'Lari900', 'password' => \Hash::make('12345678'), 'type' => 'user', 'active' => 1, 'address' => 'Heredia', 'created_at' => new DateTime(), 'updated_at' => new DateTime()]);
     User::insert($data);
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     \App\User::insert(['name' => 'Admin', 'email' => '*****@*****.**', 'role' => 1, 'password' => bcrypt('P@$$w0rd')]);
 }
 public function run()
 {
     $users = [['name' => 'Everton Inocencio', 'email' => '*****@*****.**', 'password' => \Hash::make('123456'), 'city_id' => null, 'created_at' => new \DateTime(), 'updated_at' => new \DateTime()]];
     User::insert($users);
 }
Example #22
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $users = [['name' => 'Mohamad Sholihin', 'email' => '*****@*****.**', 'phone' => '085718948898', 'address' => 'Bojong Gede', 'password' => bcrypt('user'), 'role' => 'user'], ['name' => 'Ade Dandhi', 'email' => '*****@*****.**', 'phone' => '0857xxxxxx', 'address' => 'Cibinong', 'password' => bcrypt('admin'), 'role' => 'admin']];
     User::insert($users);
 }
Example #23
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store()
 {
     $user = new User();
     $deviceDetail = new DeviceDetails();
     $data = Input::all();
     $validator = $this->checkValidation();
     if ($validator->fails()) {
         $messages = $validator->messages();
         foreach ($messages->all() as $message) {
             $msg[] = $message;
         }
         return $this->errorMessage($msg);
     }
     $userId = $user->getUserIdAttachedWithTpId($data['tp_id'], $data['id_type']);
     if ($userId) {
         $data['user_id'] = $userId;
     }
     $img_hash = $user->imageUpload($data['img_hash'], $this->uploaddir);
     if (isset($img_hash) and !empty($img_hash)) {
         $data['img_hash'] = $img_hash;
     }
     $userProfile = $user->insert($data);
     $userProfile->lat = $data['lat'];
     $userProfile->lng = $data['lng'];
     $data['user_id'] = $userProfile->id;
     $deviceDetail->insert($data);
     $msg[] = "Profile saved successfully.";
     return $this->successMessageWithVar($msg, $userProfile);
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $data = array(['name' => 'Andrew', 'last_name' => 'nunez', 'email' => '*****@*****.**', 'user' => 'andrews', 'password' => \Hash::make('123456'), 'type' => 'admin', 'active' => 1, 'address' => 'Calle Falsa 123, Springfield', 'created_at' => new DateTime(), 'updated_at' => new DateTime()], ['name' => 'Camilo', 'last_name' => 'Floss', 'email' => '*****@*****.**', 'user' => 'Flow', 'password' => \Hash::make('123456'), 'type' => 'user', 'active' => 1, 'address' => 'Av.SiempreViva, Springfield', 'created_at' => new DateTime(), 'updated_at' => new DateTime()]);
     User::insert($data);
 }
Example #25
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     User::truncate();
     $data = [["name" => "admin", "email" => "*****@*****.**", "password" => bcrypt("123456")]];
     User::insert($data);
 }
Example #26
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     User::insert(['nombre' => 'Administrador', 'apellidos' => 'Apellido', 'dni' => "44011000", 'direccion' => 'Av. Admin', 'email' => '*****@*****.**', 'password' => bcrypt('admin132')]);
     User::insert(['nombre' => 'Administrador2', 'apellidos' => 'Apellido2', 'dni' => "22011000", 'direccion' => 'Av. Admin', 'email' => '*****@*****.**', 'password' => bcrypt('admin132')]);
 }
Example #27
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $data = array(['name' => 'Julio', 'last name' => 'Alvarez', 'email' => '*****@*****.**', 'user' => 'jalvarez', 'password' => \Hash::make('123456'), 'type' => 'admin', 'active' => '1', 'address' => 'calle 123', 'created_at' => new DateTime(), 'updated_at' => new DateTime()], ['name' => 'David', 'last name' => 'Salazar', 'email' => '*****@*****.**', 'user' => 'dsalazar', 'password' => \Hash::make('123456'), 'type' => 'user', 'active' => '1', 'address' => 'calle 1234', 'created_at' => new DateTime(), 'updated_at' => new DateTime()]);
     User::insert($data);
 }
 public function createUser()
 {
     $data = Input::all();
     User::insert(['name' => $data['name'], 'email' => $data['email'], 'password' => bcrypt($data['password'])]);
     return view('welcome');
 }
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $data = array(['name' => 'Alejandro', 'last_name' => 'Flores Ramirez', 'email' => '*****@*****.**', 'user' => 'Aleks', 'password' => \Hash::make('admin@xD'), 'type' => 'admin', 'active' => 1, 'state' => 'Puebla', 'city' => 'Tehuacan', 'cp' => '75780', 'address' => 'Leyes de Reforma 234', 'created_at' => new DateTime(), 'updated_at' => new DateTime()], ['name' => 'Veronica', 'last_name' => 'Martinez Rosales', 'email' => '*****@*****.**', 'user' => 'Vero', 'password' => \Hash::make('mex__123'), 'type' => 'user', 'active' => 1, 'state' => 'Distrito Federal', 'city' => 'Gustavo Madero', 'cp' => '07189', 'address' => 'Ahuehuetes 982', 'created_at' => new DateTime(), 'updated_at' => new DateTime()]);
     User::insert($data);
 }
Example #30
0
 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $data = array(['name' => 'Alejandro', 'last_name' => 'Roa', 'email' => '*****@*****.**', 'user' => 'adela', 'password' => \Hash::make('alex854'), 'type' => 'admin', 'active' => 1, 'address' => 'Tonala 321, Jalisco', 'created_at' => new DateTime(), 'updated_at' => new DateTime()]);
     User::insert($data);
 }