mirror of
https://github.com/Poniverse/Pony.fm.git
synced 2024-11-23 05:27:59 +01:00
35 lines
No EOL
663 B
PHP
35 lines
No EOL
663 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App;
|
|
use App\User;
|
|
use Illuminate\Contracts\View\View;
|
|
|
|
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]);
|
|
}
|
|
} |