Changed channel categories from DB-backed Category records to a backed PHP enum

This commit is contained in:
2026-05-18 06:55:03 +03:30
parent 295a408965
commit 59e4ae60da
20 changed files with 221 additions and 130 deletions

View File

@@ -2,7 +2,7 @@
namespace Database\Factories;
use App\Models\Category;
use App\Enums\ChannelCategory;
use App\Models\User;
use Illuminate\Database\Eloquent\Factories\Factory;
use Illuminate\Support\Str;
@@ -15,7 +15,7 @@ class ChannelFactory extends Factory
return [
'user_id' => User::factory(),
'category_id' => Category::factory(),
'category' => fake()->randomElement(ChannelCategory::cases())->value,
'slug' => Str::slug($name),
'display_name' => Str::headline($name),
'description' => fake()->sentence(),