feat(cms): sync site assets, revalidate webhook, and document download naming

This commit is contained in:
2026-02-10 23:38:31 +08:00
parent c4969cd4d2
commit b6e18a83ec
27 changed files with 1019 additions and 26 deletions

View 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),
];
}
}