diff --git a/resources/views/pages/music.blade.php b/resources/views/pages/music.blade.php new file mode 100644 index 0000000..cba45c2 --- /dev/null +++ b/resources/views/pages/music.blade.php @@ -0,0 +1,55 @@ +@extends('layouts.default') +@section('title', 'Music') +@section('description', '') +@section('content') + @php + + $cfg = app('config')->get('services')['lastfm']; + $api_root = app('config')->get('app')['api_root']; + + $current_track = json_decode(file_get_contents($api_root . '/lastfm/current')); + $toptracks = json_decode(file_get_contents($api_root . '/lastfm/top')); + $count = 0; + @endphp +
+ Last/Current Track:+ |
+ |||
+ {{ $current_track->name }} • {{ $current_track->artist }} + |
+ |||
+ + |
+ |||
+ Top {{ $cfg['toptracks'] }} Tracks (Last 7 days)+ |
+ |||
# | +Track | +Artist | +Plays | +
{{ $count+1 }} | +{{ $track->name }} | +{{ $track->artist }} | +{{ $track->plays }} | +