feat(cms): sync site assets, revalidate webhook, and document download naming
This commit is contained in:
28
database/factories/ArticleCategoryFactory.php
Normal file
28
database/factories/ArticleCategoryFactory.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use App\Models\ArticleCategory;
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* @extends Factory<ArticleCategory>
|
||||
*/
|
||||
class ArticleCategoryFactory extends Factory
|
||||
{
|
||||
protected $model = ArticleCategory::class;
|
||||
|
||||
public function definition(): array
|
||||
{
|
||||
$name = $this->faker->unique()->words(2, true);
|
||||
|
||||
return [
|
||||
'name' => $name,
|
||||
'slug' => Str::slug($name) ?: 'category-'.Str::random(8),
|
||||
'description' => $this->faker->optional()->sentence(),
|
||||
'sort_order' => $this->faker->numberBetween(0, 50),
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user