⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.19
Server IP:
178.33.27.10
Server:
Linux cpanel.dev-unit.com 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64
Server Software:
Apache/2.4.57 (Unix) OpenSSL/1.0.2k-fips
PHP Version:
8.2.11
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
id
/
dalily-1.dev-unit.com
/
database
/
factories
/
View File Name :
TransactionFactory.php
<?php namespace Database\Factories; use App\Models\Transaction; use App\Models\User; use Illuminate\Database\Eloquent\Factories\Factory; use Illuminate\Support\Arr; use Modules\Plan\Entities\Plan; class TransactionFactory extends Factory { /** * The name of the factory's corresponding model. * * @var string */ protected $model = Transaction::class; /** * Define the model's default state. * * @return array */ public function definition() { return [ 'order_id' => rand(1000000, 999999999), 'transaction_id' => uniqid('tr_'), 'payment_provider' => Arr::random(['flutterwave', 'mollie', 'midtrans', 'paypal', 'paystack', 'razorpay', 'sslcommerz', 'stripe', 'instamojo']), 'plan_id' => Plan::inRandomOrder()->value('id'), 'user_id' => User::inRandomOrder()->value('id'), 'amount' => Arr::random([20, 50, 100]), 'currency_symbol' => Arr::random(['$', '£', '€']), 'usd_amount' => Arr::random([20, 50, 100]), 'payment_status' => 'paid', 'created_at' => $this->faker->dateTimeBetween('-1 year', 'now'), ]; } }