Pony.fm/app/controllers/AlbumsController.php
2013-07-31 21:01:41 -05:00

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]);
}
}