Skip to content

Commit

Permalink
v73.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
gammamatrix committed Apr 3, 2024
1 parent 6152996 commit 1e805ab
Showing 1 changed file with 15 additions and 2 deletions.
17 changes: 15 additions & 2 deletions database/factories/TicketFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
namespace Database\Factories\Playground\Matrix\Models;

use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
use Playground\Matrix\Models\Ticket;

/**
Expand All @@ -33,10 +32,24 @@ public function definition(): array
{
$title = $this->faker->sentence(3);

$key = $this->faker->lexify();
$code = $this->faker->randomNumber(8);

$slug = sprintf(
'%1$s-%2$d',
$key,
$code
);

$key_code_hash = md5($slug);

return [
'label' => $this->faker->sentence(3),
'title' => $title,
'slug' => Str::slug($title, '-'),
'key' => $key,
'slug' => $slug,
'key_code_hash' => $key_code_hash,
'code' => $code,
'description' => $this->faker->sentence(3),
'introduction' => $this->faker->sentence(3),
'content' => $this->faker->sentence(3),
Expand Down

0 comments on commit 1e805ab

Please sign in to comment.