mirror of
https://gh.wpcy.net/https://github.com/fairpm/aspirecloud.git
synced 2026-06-20 02:22:28 +08:00
28 lines
689 B
PHP
28 lines
689 B
PHP
<?php
|
|
declare(strict_types=1);
|
|
|
|
namespace Database\Factories\WpOrg;
|
|
|
|
use App\Models\WpOrg\Author;
|
|
use Illuminate\Database\Eloquent\Factories\Factory;
|
|
use Illuminate\Support\Str;
|
|
|
|
/** @extends Factory<Author> */
|
|
class AuthorFactory extends Factory
|
|
{
|
|
protected $model = Author::class;
|
|
|
|
public function definition(): array
|
|
{
|
|
$name = $this->faker->name();
|
|
|
|
return [
|
|
'user_nicename' => Str::slug($name),
|
|
'profile' => $this->faker->url(),
|
|
'avatar' => $this->faker->imageUrl(100, 100, 'people'),
|
|
'display_name' => $name,
|
|
'author' => $name,
|
|
'author_url' => $this->faker->url(),
|
|
];
|
|
}
|
|
}
|