Backend for songs.zachdecook.com
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php

namespace App\Http\Controllers;

use App\Playlist;
use Illuminate\Http\Request;

class PlaylistController extends Controller
{
    public function show( $playlistName )
    {
        $playlist = Playlist::where('name', $playlistName)->first();
        if ( $playlist ) {
            return view('playlist', ['playlist' => $playlist ] );
        }
        abort(404);
    }
}