@extends('layouts.app-admin') @section('content')

Genres

@php // $genresx = [ // [ // 'name' => 'Pop', // 'description' => 'Contemporary popular music', // 'songs' => 245, // 'albums' => 32, // 'status' => 'Active', // 'color' => 'blue', // ], // [ // 'name' => 'Hip Hop', // 'description' => 'Music consisting of stylized rhythmic music', // 'songs' => 187, // 'albums' => 24, // 'status' => 'Active', // 'color' => 'purple', // ], // [ // 'name' => 'Rock', // 'description' => 'Music centered on the electric guitar', // 'songs' => 156, // 'albums' => 18, // 'status' => 'Active', // 'color' => 'red', // ], // [ // 'name' => 'R&B', // 'description' => 'Rhythm and blues music', // 'songs' => 132, // 'albums' => 15, // 'status' => 'Active', // 'color' => 'orange', // ], // [ // 'name' => 'Electronic', // 'description' => 'Music that employs electronic instruments', // 'songs' => 118, // 'albums' => 14, // 'status' => 'Active', // 'color' => 'cyan', // ], // [ // 'name' => 'Jazz', // 'description' => 'Music characterized by improvisation and swing', // 'songs' => 87, // 'albums' => 12, // 'status' => 'Active', // 'color' => 'yellow', // ], // [ // 'name' => 'Classical', // 'description' => 'Art music produced in the Western tradition', // 'songs' => 76, // 'albums' => 9, // 'status' => 'Active', // 'color' => 'lime', // ], // [ // 'name' => 'Country', // 'description' => 'Music originating in the rural Southern US', // 'songs' => 65, // 'albums' => 8, // 'status' => 'Active', // 'color' => 'green', // ], // [ // 'name' => 'Folk', // 'description' => 'Traditional music passed through generations', // 'songs' => 54, // 'albums' => 7, // 'status' => 'Inactive', // 'color' => 'teal', // ], // [ // 'name' => 'Reggae', // 'description' => 'Music originating in Jamaica', // 'songs' => 43, // 'albums' => 6, // 'status' => 'Pending', // 'color' => 'indigo', // ], // ]; @endphp @foreach ($genres as $genre) @endforeach
Genre Description Songs Albums Status Actions
{{ $genre->name }}
{{ $genre->description }} {{ $genre->songs_count }} {{ $genre->albums_count }} @if ($genre->status == 'active') Active @elseif($genre->status == 'pending') Pending @else Inactive @endif

Genre Distribution

@php $totalSongs = $genres->sum('songs_count'); @endphp @foreach ($genres->take(5) as $genre)
{{ $genre->name }} {{ $totalSongs > 0 ? round(($genre->songs_count / $totalSongs) * 100) : 0 }}%
@endforeach
@endsection @section('scripts') @endsection @push('styles') @endpush