|
- <?php
-
- namespace Database\Seeders;
-
- use Illuminate\Database\Seeder;
- use App\Models\User;
- use App\Models\Order;
- use App\Models\Service;
- use Illuminate\Support\Facades\Hash;
- use \Stripe\Stripe;
- use \Stripe\Customer;
-
- class DatabaseSeeder extends Seeder
- {
- /**
- * Seed the application's database.
- *
- * @return void
- */
- public function run()
- {
- Stripe::setApiKey(config('services.stripe.secret'));
-
- User::create([
- 'name' => 'test_user_unverified',
- 'email' => 'unverified@example.com',
- 'role' => 'client',
- 'credits' => 55000,
- 'active' => true,
- 'password' => Hash::make("test123")
- ]);
- $test_user = User::create([
- 'name' => 'test_user_verified',
- 'email' => 'verified@example.com',
- 'email_verified_at' => now(),
- 'credits' => 25000,
- 'role' => 'client',
- 'active' => true,
- 'password' => Hash::make("test123")
- ]);
- User::create([
- 'name' => 'test_admin_verified',
- 'email' => 'admin_verified@example.com',
- 'email_verified_at' => now(),
- 'role' => 'admin',
- 'credits' => 55000,
- 'active' => true,
- 'password' => Hash::make("test123")
- ]);
-
- Order::factory()->count(15)->for($test_user)->create();
- Order::factory()->count(25)->create();
- }
- }
|