feat: add is_premium
This commit is contained in:
@@ -50,6 +50,7 @@ public function store(Request $request)
|
||||
'detail_image' => 'nullable|file|extensions:jpg,jpeg,png,gif,webp,bmp,svg|max:8192',
|
||||
'order' => 'nullable|integer',
|
||||
'is_active' => 'nullable|boolean',
|
||||
'is_premium' => 'nullable|boolean',
|
||||
]);
|
||||
|
||||
// Ensure at least one category or subcategory is provided
|
||||
@@ -144,6 +145,7 @@ public function update(Request $request, $id)
|
||||
'detail_image' => 'nullable|file|extensions:jpg,jpeg,png,gif,webp,bmp,svg|max:8192',
|
||||
'order' => 'nullable|integer',
|
||||
'is_active' => 'nullable|boolean',
|
||||
'is_premium' => 'nullable|boolean',
|
||||
]);
|
||||
|
||||
if (isset($data['name'])) {
|
||||
|
||||
@@ -16,11 +16,12 @@ class MusicPlaylist extends Model
|
||||
protected $table = 'music_playlists';
|
||||
|
||||
protected $fillable = [
|
||||
'name', 'slug', 'description', 'image_id', 'detail_image_id', 'order', 'is_active'
|
||||
'name', 'slug', 'description', 'image_id', 'detail_image_id', 'order', 'is_active', 'is_premium'
|
||||
];
|
||||
|
||||
|
||||
protected $casts = [
|
||||
'is_active' => 'boolean',
|
||||
'is_premium' => 'boolean',
|
||||
'order' => 'integer',
|
||||
];
|
||||
protected $appends = [
|
||||
|
||||
Reference in New Issue
Block a user