Admin Panelinde "Öne Çıkan İçerik" Seçimi (Song Pattern Klonu)
11 Ocak 2026
Site ana sayfasında sidebar'da **"Popüler Playlistler"** ve **"Popüler Radyolar"** bölümü olacak. Admin panelinde playlist veya radyo düzenlerken **"☑ Öne Çıkan"** kutucuğunu işaretleyecek, işaretlenen içerikler sidebar'da gösterilecek.
Nasıl Çalışacak?
Referans:
Şarkılarda zaten is_featured sistemi var. Aynı pattern playlist ve radio'ya uygulanacak.
Şarkılarda zaten mevcut olan is_featured sistemi:
1. Database Field
is_featured tinyint(1) NOT NULL DEFAULT 0, INDEX (is_featured)
2. Model (Song.php)
protected $fillable = [..., 'is_featured'];
protected $casts = ['is_featured' => 'boolean'];
public function scopeFeatured($query) {
return $query->where('is_featured', true);
}
3. Admin Checkbox (song-manage-component.blade.php:315-324)
<div class="pretty p-default p-curve p-toggle p-smooth">
<input type="checkbox" wire:model="inputs.is_featured" />
<div class="state p-warning p-on">
<label>Öne Çıkan</label>
</div>
</div>
Playlists
is_featured field ekleRadios
is_featured field eklePlaylist Dosyaları
Migration (Central + Tenant):
Modules/Muzibu/database/migrations/2026_01_11_xxx_add_is_featured_to_playlists.phpModules/Muzibu/database/migrations/tenant/2026_01_11_xxx_add_is_featured_to_playlists.phpModel:
Modules/Muzibu/App/Models/Playlist.php (fillable, cast, scopeFeatured)Admin Panel:
Modules/Muzibu/resources/views/admin/livewire/playlist-manage-component.blade.phpModules/Muzibu/App/Http/Livewire/Admin/PlaylistManageComponent.phpTranslation:
Modules/Muzibu/resources/lang/tr/admin.php (featured, not_featured)Radio Dosyaları
Migration (Central + Tenant):
Modules/Muzibu/database/migrations/2026_01_11_xxx_add_is_featured_to_radios.phpModules/Muzibu/database/migrations/tenant/2026_01_11_xxx_add_is_featured_to_radios.phpModel:
Modules/Muzibu/App/Models/Radio.php (fillable, cast, scopeFeatured)Admin Panel:
Modules/Muzibu/resources/views/admin/livewire/radio-manage-component.blade.phpModules/Muzibu/App/Http/Livewire/Admin/RadioManageComponent.phpTranslation:
Modules/Muzibu/resources/lang/tr/admin.php (featured, not_featured)Migration Oluştur (Central + Tenant)
$table->boolean('is_featured')->default(false)->after('is_radio')->index();
Playlist Model Güncelle
fillable: is_featured eklecasts: 'is_featured' => 'boolean'scopeFeatured() method ekleAdmin Checkbox Ekle (playlist-manage-component.blade.php)
Song'daki checkbox'ın aynısını kopyala, "Öne Çıkan" label'ı ile
Translation Ekle (tr/admin.php)
'playlist.featured' => 'Öne Çıkan',
'playlist.not_featured' => 'Normal',
Migration Çalıştır
php artisan tenants:migrate --force
Migration Oluştur (Central + Tenant)
$table->boolean('is_featured')->default(false)->after('is_active')->index();
Radio Model Güncelle
fillable: is_featured eklecasts: 'is_featured' => 'boolean'scopeFeatured() method ekleAdmin Checkbox Ekle (radio-manage-component.blade.php)
Song'daki checkbox'ın aynısını kopyala, "Öne Çıkan" label'ı ile
Translation Ekle (tr/admin.php)
'radio.featured' => 'Öne Çıkan',
'radio.not_featured' => 'Normal',
Migration Çalıştır
php artisan tenants:migrate --force
Admin Panel Test
Database Kontrol
SELECT playlist_id, title, is_featured FROM muzibu_playlists WHERE is_featured=1;
SELECT radio_id, title, is_featured FROM muzibu_radios WHERE is_featured=1;
Model Scope Test
Playlist::featured()->get(); // Öne çıkanları getir
Radio::featured()->get(); // Öne çıkanları getir
İşlem tamamlandığında admin panelinde playlist ve radyo düzenlerken "Öne Çıkan" checkbox'ı görünecek. İşaretlenen içerikler frontend'te sidebar'da gösterilmeye hazır olacak.
Playlist
is_featured field eklendiPlaylist::featured() scope çalışıyorRadio
is_featured field eklendiRadio::featured() scope çalışıyorFrontend Entegrasyon
Sidebar widget oluşturulduğunda şu şekilde kullanılacak:
$featuredPlaylists = Playlist::featured()->active()->limit(5)->get();
$featuredRadios = Radio::featured()->active()->limit(5)->get();