Skip to content

Commit

Permalink
Update factory for status record #27
Browse files Browse the repository at this point in the history
  • Loading branch information
drewroberts authored Mar 20, 2021
1 parent 1b2ba07 commit f8e4876
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions database/factories/StatusRecordFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,14 @@ class StatusRecordFactory extends Factory

public function definition()
{
$statusable = randomOrCreate(app('user'));
$status = randomOrCreate(app('status'));

return [
'status_id' => randomOrCreate(app('status')),
'type' => get_class(app('status')),
'statusable_type' => get_class(app('user')),
'statusable_id' => randomOrCreate(app('user')),
'status_id' => $status,
'type' => $status->type,
'statusable_type' => get_class($statusable),
'statusable_id' => $statusable->id,
'creator_id' => randomOrCreate(app('user')),
];
}
Expand Down

0 comments on commit f8e4876

Please sign in to comment.