about summary refs log tree commit diff
path: root/laravel/app/Http/Controllers/PlaylistController.php
blob: 49b1f3586fc63111aa0e24651f06f45440813f62 (plain)
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);
    }
}