This commit is contained in:
Malibu
2015-03-10 16:11:17 +01:00
4 changed files with 133 additions and 75 deletions

View File

@ -1,18 +1,8 @@
<?php namespace App\Http\Controllers;
use User;
class HomeController extends Controller {
/*
|--------------------------------------------------------------------------
| Home Controller
|--------------------------------------------------------------------------
|
| This controller renders your application's "dashboard" for users that
| are authenticated. Of course, you are free to change or remove the
| controller as you wish. It is just here to get your app started!
|
*/
/**
* Create a new controller instance.
*
@ -20,7 +10,7 @@ class HomeController extends Controller {
*/
public function __construct()
{
$this->middleware('auth');
//
}
/**
@ -30,9 +20,34 @@ class HomeController extends Controller {
*/
public function index()
{
return view('home');
$res = User::referents()->get();
return view('home',['referents' => $res]);
}
/**
* Show referent games
*
* @param String $id
* @return Response
*/
public function showReferentGames($id)
{
return view('referent_games', ['referent' => $id]);
}
/**
* Show one referent game
*
* @param String $id
* @param String $idGame
* @return Response
*/
public function showOneReferentGame($id, $idGame)
{
return view('one_referent_game', ['referent' => $id, 'game' => $idGame]);
}
}
?>