2013-07-25 23:33:04 +02:00
|
|
|
<?php
|
|
|
|
|
2013-08-01 04:01:41 +02:00
|
|
|
use Entities\User;
|
|
|
|
|
2013-07-25 23:33:04 +02:00
|
|
|
class ArtistsController extends Controller {
|
|
|
|
public function getIndex() {
|
|
|
|
return View::make('artists.index');
|
|
|
|
}
|
2013-08-01 04:01:41 +02:00
|
|
|
|
|
|
|
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]);
|
|
|
|
}
|
2013-07-25 23:33:04 +02:00
|
|
|
}
|