Advertisement
Guest User

seeeder user

a guest
Apr 17th, 2018
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. DB::table('users')->delete();
  2.  
  3. // Super Admin
  4. $superAdmin = new \App\User();
  5. $superAdmin->name = 'Mr. Super Admin';
  6. $superAdmin->email = 'super.admin@gmail.com';
  7. $superAdmin->password = bcrypt('haha1234');
  8. $superAdmin->ic_number = '80080808888';
  9. $superAdmin->role = 'super_admin';
  10. $superAdmin->access_power = 10000;
  11. $superAdmin->avatar = '/images/user/super_admin.png';
  12. $superAdmin->status = 'active';
  13. $superAdmin->save();
  14.  
  15. // survey
  16. $admin = new \App\User();
  17. $admin->name = 'Mr. Admin';
  18. $admin->email = 'survey@gmail.com';
  19. $admin->password = bcrypt('haha1234');
  20. $admin->ic_number = '800707077777';
  21. $admin->role = 'survey_officer';
  22. $admin->access_power = 5000;
  23. $admin->status = 'active';
  24. $admin->save();
  25.  
  26. // editor
  27. $admin = new \App\User();
  28. $admin->name = 'Mr. Admin Ministry';
  29. $admin->email = 'editor@gmail.com';
  30. $admin->password = bcrypt('haha1234');
  31. $admin->ic_number = '800707076666';
  32. $admin->role = 'editor';
  33. $admin->access_power = 1000;
  34. $admin->status = 'active';
  35. $admin->save();
  36.  
  37. // user
  38. $user = new \App\User();
  39. $user->name = 'Mr. User';
  40. $user->email = 'user@gmail.com';
  41. $user->password = bcrypt('haha1234');
  42. $user->ic_number = '800707071111';
  43. $user->role = 'top_mgmt';
  44. $user->access_power = 100;
  45. $user->status = 'active';
  46. $user->save();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement