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

25 lines
No EOL
494 B
PHP

<?php
use Entities\User;
class ArtistsController extends Controller {
public function getIndex() {
return View::make('artists.index');
}
public function getProfile($slug) {
$user = User::whereSlug($slug)->first();
if (!$user)
App::abort('404');
return View::make('artists.profile');
}
public function getShortlink($id) {
$user = User::find($id);
if (!$user)
App::abort('404');
return Redirect::action('ArtistsController@getProfile', [$id]);
}
}