mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-26 14:58:00 +01:00
28 lines
No EOL
598 B
PHP
28 lines
No EOL
598 B
PHP
<?php
|
|
|
|
use Entities\Album;
|
|
|
|
class AlbumsController extends Controller {
|
|
public function getIndex() {
|
|
return View::make('albums.index');
|
|
}
|
|
|
|
public function getShow($id, $slug) {
|
|
$album = Album::find($id);
|
|
if (!$album)
|
|
App::abort(404);
|
|
|
|
if ($album->slug != $slug)
|
|
return Redirect::action('AlbumsController@getAlbum', [$id, $album->slug]);
|
|
|
|
return View::make('albums.show');
|
|
}
|
|
|
|
public function getShortlink($id) {
|
|
$album = Album::find($id);
|
|
if (!$album)
|
|
App::abort(404);
|
|
|
|
return Redirect::action('AlbumsController@getTrack', [$id, $album->slug]);
|
|
}
|
|
} |