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

37 lines
652 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-13 07:26:46 +02:00
use View;
use Redirect;
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]);
}
2015-09-13 07:26:46 +02:00
}