. */ namespace Poniverse\Ponyfm\Http\Controllers; use App; use Poniverse\Ponyfm\Models\User; use View; use Redirect; class ArtistsController extends Controller { public function getIndex() { return View::make('artists.index'); } public function getFavourites($slug) { return $this->getProfile($slug); } public function getContent($slug) { return $this->getProfile($slug); } public function getProfile($slug) { $user = User::whereSlug($slug)->whereNull('disabled_at')->first(); if (!$user) { App::abort('404'); } return View::make('artists.profile'); } public function getShortlink($id) { $user = User::find($id); if (!$user || $user->disabled_at !== null) { App::abort('404'); } return Redirect::action('ArtistsController@getProfile', [$user->slug]); } }