My SMM panel
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

55 line
1.2 KiB

  1. <?php
  2. namespace Database\Seeders;
  3. use Illuminate\Database\Seeder;
  4. use App\Models\User;
  5. use App\Models\Order;
  6. use App\Models\Service;
  7. use Illuminate\Support\Facades\Hash;
  8. use \Stripe\Stripe;
  9. use \Stripe\Customer;
  10. class DatabaseSeeder extends Seeder
  11. {
  12. /**
  13. * Seed the application's database.
  14. *
  15. * @return void
  16. */
  17. public function run()
  18. {
  19. Stripe::setApiKey(config('services.stripe.secret'));
  20. User::create([
  21. 'name' => 'test_user_unverified',
  22. 'email' => 'unverified@example.com',
  23. 'role' => 'client',
  24. 'credits' => 55000,
  25. 'active' => true,
  26. 'password' => Hash::make("test123")
  27. ]);
  28. $test_user = User::create([
  29. 'name' => 'test_user_verified',
  30. 'email' => 'verified@example.com',
  31. 'email_verified_at' => now(),
  32. 'credits' => 25000,
  33. 'role' => 'client',
  34. 'active' => true,
  35. 'password' => Hash::make("test123")
  36. ]);
  37. User::create([
  38. 'name' => 'test_admin_verified',
  39. 'email' => 'admin_verified@example.com',
  40. 'email_verified_at' => now(),
  41. 'role' => 'admin',
  42. 'credits' => 55000,
  43. 'active' => true,
  44. 'password' => Hash::make("test123")
  45. ]);
  46. Order::factory()->count(15)->for($test_user)->create();
  47. Order::factory()->count(25)->create();
  48. }
  49. }