/** * Run the database seeds. * * @return void */ public function run() { DB::table('users')->truncate(); // Create default administrator user App\Models\User::create(array('name' => 'Administrator', 'email' => '*****@*****.**', 'password' => bcrypt('p4ssw0rd'), 'id_user_role' => 1)); factory(App\Models\User::class, 15)->create(); }
public function run() { // Disable foreign key check for this connection. DB::statement('SET FOREIGN_KEY_CHECKS=0;'); // Delete all records. DB::table('users')->delete(); // Reset AUTO_INCREMENT. DB::table('users')->truncate(); // Dev user. App\Models\User::create(['email' => '*****@*****.**', 'password' => '$2y$10$t6q81nz.XrMrh20NHDvxUu/szwHBwgzPd.01e8uuP0qVy0mPa6H/e', 'first_name' => 'L5', 'last_name' => 'App', 'username' => 'l5-app', 'is_email_verified' => 1]); // Dummy users. TestDummy::times(10)->create('App\\Models\\User'); }
/** * Run the database seeds. * * @return void */ public function run() { if (App\Models\User::count() < 1) { $publicPath = env('PUBLIC_PATH'); $SuperAdmin = ['name' => 'Razi', 'email' => '*****@*****.**', 'username' => 'razi', 'password' => bcrypt('1234'), 'date_of_birth' => '1992-02-01', 'phone' => '9746730324', 'address' => 'kallayi House, Kooriyad, Indianoor PO, Kottakkal (via), Malappuram (Dt), Kerala (State), India', 'gender' => 'M', 'avatar' => url($publicPath . 'uploads/avatar/razi/razi.jpg'), 'user_type_id' => '5', 'school_id' => '2', 'status' => 'ACTIVE']; $user = App\Models\User::create($SuperAdmin); $SuperAdmin = ['designation' => 'Developer', 'user_id' => $user->id]; App\Models\Foundation::create($SuperAdmin); $Student = ['name' => 'Aysha Nazrin', 'email' => '*****@*****.**', 'username' => 'aysha', 'password' => bcrypt('1234'), 'date_of_birth' => '2000-02-02', 'phone' => '9956656525', 'address' => 'Velliveyil House, Eranhippalam PO, Calicut', 'gender' => 'F', 'avatar' => 'http://localhost/pschool/public/uploads/avatar/aysha/Ayshatest.png', 'user_type_id' => '1', 'school_id' => '1', 'status' => 'ACTIVE']; $user = App\Models\User::create($Student); $StudentDetails = ['course_school_id' => '1', 'roll_no' => '2', 'admission_no' => '1001', 'year_of_admission' => '2006', 'user_id' => $user->id]; App\Models\Student::create($StudentDetails); $Staff = ['name' => 'Ishaq Sheikh', 'email' => '*****@*****.**', 'username' => 'ishaq', 'password' => bcrypt('1234'), 'date_of_birth' => '1989-12-22', 'phone' => '9857645696', 'address' => 'Good House, Kadampuzha PO, Malappuram', 'gender' => 'M', 'avatar' => 'http://localhost/pschool/public/uploads/avatar/ishaq/ishaqTest.png', 'user_type_id' => '2', 'school_id' => '1', 'status' => 'ACTIVE']; $user = App\Models\User::create($Staff); $StaffDetails = ['department' => 'Sociology', 'user_id' => $user->id]; App\Models\Staff::create($StaffDetails); } else { // factory('App\Models\User')->create(); } }
public function testLogin() { App\Models\User::create(['email' => '*****@*****.**', 'password' => bcrypt('testing')]); $this->visit('/login')->type('*****@*****.**', 'email')->type('testing', 'password')->press('Login')->seePageIs('/dashboard'); App\Models\User::where('email', '*****@*****.**')->delete(); }
/** * Run the database seeds. * * @return void */ public function run() { App\Models\User::create(['name' => 'John Admin Doe', 'email' => '*****@*****.**', 'password' => Hash::make('Testing123')]); App\Models\User::create(['name' => 'Jake Employee Doe', 'email' => '*****@*****.**', 'password' => Hash::make('Testing123')]); $this->command->info('User table seeded!'); }
/** * Run the database seeds. * * @return void */ public function run() { $u = App\Models\User::create(['name' => 'Root Admin', 'email' => '*****@*****.**', 'login' => 'admin', 'password' => bcrypt('ololo'), 'phone' => '+380987654321', 'remember_token' => str_random(10), 'active' => 1]); $u = App\Models\User::create(['name' => 'Moderator', 'email' => '*****@*****.**', 'login' => 'manager', 'password' => bcrypt('ololo'), 'phone' => '+380987654321', 'remember_token' => str_random(10), 'active' => 1]); //factory( App\Models\User::class, 5 )->create(); }