Pony.fm/app/Http/Controllers/ArtistsController.php

35 lines
663 B
PHP
Raw Normal View History

2015-08-31 16:30:02 +02:00
<?php
2015-09-06 19:21:11 +02:00
namespace App\Http\Controllers;
use App;
2015-08-31 16:30:02 +02:00
use App\User;
2015-09-06 19:21:11 +02:00
use Illuminate\Contracts\View\View;
2015-08-31 16:30:02 +02:00
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]);
}
}