remove compose file to another repo
This commit is contained in:
31
database/factories/CallHistoryFactory.php
Normal file
31
database/factories/CallHistoryFactory.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\Call;
|
||||
use App\Models\Event;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\CallHistory>
|
||||
*/
|
||||
class CallHistoryFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'call_id' => Call::factory(),
|
||||
'telephone_id' => $this->faker->numerify('tel-####'),
|
||||
'caller_phone_number' => '09' . $this->faker->randomNumber(9, true),
|
||||
'event_id' => Event::factory(),
|
||||
'event_name' => function (array $attributes) {
|
||||
return Event::query()->find($attributes['event_id'])->name;
|
||||
}
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user