update routes + surprise :P

This commit is contained in:
Malibu 2015-02-15 17:10:23 +01:00
parent 115005f2ca
commit e5cb54f8de
9 changed files with 87 additions and 14 deletions

View File

@ -22,4 +22,29 @@ class GameController extends Controller {
return view('home'); return view('home');
} }
/**
* 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]);
}
} }

View File

@ -71,9 +71,9 @@ class LoginController extends Controller {
switch ($response = Password::remind(Input::only('email'))) switch ($response = Password::remind(Input::only('email')))
{ {
case Password::INVALID_USER: case Password::INVALID_USER:
return redirect('oublie')->withErrors($response)->withInput(); return redirect('forgotten')->withErrors($response)->withInput();
case Password::REMINDER_SENT: case Password::REMINDER_SENT:
return redirect('oublie')->withStatus($response)->withInput(); return redirect('forgotten')->withStatus($response)->withInput();
} }
} }

View File

@ -12,24 +12,26 @@
*/ */
Route::get('/', 'GameController@index'); Route::get('/', 'GameController@index');
Route::get('referents/{id}/games', 'GameController@showReferentGames')->where('id', '^((?!login|referent|admin).)*$');
Route::get('referents/{id}/games/{idGame}', 'GameController@showOneReferentGame');
Route::group(['middleware' => 'guest'], function () Route::group(['middleware' => 'guest'], function ()
{ {
Route::get('login', 'LoginController@index'); Route::get('login', 'LoginController@index');
Route::post('login', 'LoginController@authenticate'); Route::post('login', 'LoginController@authenticate');
Route::get('oublie', 'LoginController@forgottenPassword'); Route::get('forgotten', 'LoginController@forgottenPassword');
Route::post('oublie', 'LoginController@initPassword'); Route::post('forgotten', 'LoginController@initPassword');
}); });
Route::group(['middleware' => 'auth'], function () Route::group(['middleware' => 'auth'], function ()
{ {
Route::get('referent', 'ReferentController@index'); Route::get('referent', 'ReferentController@index');
Route::get('logout', 'LoginController@logout'); Route::get('logout', 'LoginController@logout');
}); });
Route::group(['middleware' => 'admin'], function () Route::group(['middleware' => 'admin'], function ()
{ {
Route::get('admin', 'AdminController@index'); Route::get('admin', 'AdminController@index');
Route::post('logout', 'LoginController@logout');
}); });

View File

@ -55,9 +55,9 @@ return [
'mysql' => [ 'mysql' => [
'driver' => 'mysql', 'driver' => 'mysql',
'host' => env('DB_HOST', 'localhost'), 'host' => env('DB_HOST', 'localhost'),
'database' => env('DB_DATABASE', ''), 'database' => env('DB_DATABASE', 'moduleweb'),
'username' => env('DB_USERNAME', ''), 'username' => env('DB_USERNAME', 'root'),
'password' => env('DB_PASSWORD', ''), 'password' => env('DB_PASSWORD', 'malibu81'),
'charset' => 'utf8', 'charset' => 'utf8',
'collation' => 'utf8_unicode_ci', 'collation' => 'utf8_unicode_ci',
'prefix' => '', 'prefix' => '',

View File

@ -51,7 +51,7 @@
Login Login
</button> </button>
<a href="/oublie">Mot de passe oublié?</a> <a href="/forgotten">Mot de passe oublié?</a>
</div> </div>
</div> </div>
</form> </form>

View File

@ -26,13 +26,13 @@
<!-- Wrapper for slides --> <!-- Wrapper for slides -->
<div class="carousel-inner" role="listbox"> <div class="carousel-inner" role="listbox">
<div class="item active"> <div class="item active">
<img src="./pictures/1.jpg" width="35%" alt="indians"> <a href="/referents/vive.linux/games"><img src="./pictures/1.jpg" width="35%" alt="indians"></a>
<div class="carousel-caption"> <div class="carousel-caption">
Ceci est une image Ceci est une image
</div> </div>
</div> </div>
<div class="item"> <div class="item">
<img src="./pictures/2.jpg" width="35%" alt="others indians"> <a href="/referents/vive.linux/games"><img src="./pictures/2.jpg" width="35%" alt="others indians"></a>
<div class="carousel-caption"> <div class="carousel-caption">
Ceci est une image différente de l'autre Ceci est une image différente de l'autre
</div> </div>

View File

@ -7,7 +7,7 @@
<p class="navbar-text">Prenom</p> <p class="navbar-text">Prenom</p>
<p class="navbar-text">Identifiant</p> <p class="navbar-text">Identifiant</p>
<ul class="nav navbar-nav navbar-right"> <ul class="nav navbar-nav navbar-right">
<li><a href="#">Se déconnecter</a></li> <li><a href="logout">Se déconnecter</a></li>
</ul> </ul>
</div> </div>
</nav> </nav>

View File

@ -0,0 +1,7 @@
@extends('app')
<br>
<center><h1>{{ $game }}</h1></center>
<br><br>
<center><img src="http://i.ytimg.com/vi/xiIO1zUXNVI/maxresdefault.jpg" width="60%"></center>

View File

@ -0,0 +1,39 @@
@extends('app')
<br>
<center><h1>Games</h1></center>
<br>
<br>
<div class="container">
<div class="col-sm-6 col-md-4">
<div class="thumbnail">
<img data-src="holder.js/100%x200" alt="100%x200" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMjQyIiBoZWlnaHQ9IjIwMCIgdmlld0JveD0iMCAwIDI0MiAyMDAiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPjxkZWZzLz48cmVjdCB3aWR0aD0iMjQyIiBoZWlnaHQ9IjIwMCIgZmlsbD0iI0VFRUVFRSIvPjxnPjx0ZXh0IHg9IjkxLjc5Njg3NSIgeT0iMTAwIiBzdHlsZT0iZmlsbDojQUFBQUFBO2ZvbnQtd2VpZ2h0OmJvbGQ7Zm9udC1mYW1pbHk6QXJpYWwsIEhlbHZldGljYSwgT3BlbiBTYW5zLCBzYW5zLXNlcmlmLCBtb25vc3BhY2U7Zm9udC1zaXplOjExcHQ7ZG9taW5hbnQtYmFzZWxpbmU6Y2VudHJhbCI+MjQyeDIwMDwvdGV4dD48L2c+PC9zdmc+" data-holder-rendered="true" style="height: 200px; width: 100%; display: block;">
<div class="caption">
<h3>Jeu du pendu</h3>
<p>sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea vo</p>
<p><a href="games/pendu" class="btn btn-default" role="button">Button</a></p>
</div>
</div>
</div>
<div class="col-sm-6 col-md-4">
<div class="thumbnail">
<img data-src="holder.js/100%x200" alt="100%x200" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMjQyIiBoZWlnaHQ9IjIwMCIgdmlld0JveD0iMCAwIDI0MiAyMDAiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPjxkZWZzLz48cmVjdCB3aWR0aD0iMjQyIiBoZWlnaHQ9IjIwMCIgZmlsbD0iI0VFRUVFRSIvPjxnPjx0ZXh0IHg9IjkxLjc5Njg3NSIgeT0iMTAwIiBzdHlsZT0iZmlsbDojQUFBQUFBO2ZvbnQtd2VpZ2h0OmJvbGQ7Zm9udC1mYW1pbHk6QXJpYWwsIEhlbHZldGljYSwgT3BlbiBTYW5zLCBzYW5zLXNlcmlmLCBtb25vc3BhY2U7Zm9udC1zaXplOjExcHQ7ZG9taW5hbnQtYmFzZWxpbmU6Y2VudHJhbCI+MjQyeDIwMDwvdGV4dD48L2c+PC9zdmc+" data-holder-rendered="true" style="height: 200px; width: 100%; display: block;">
<div class="caption">
<h3>Puzzle</h3>
<p>sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea vo</p>
<p><a href="games/puzzle" class="btn btn-default" role="button">Button</a></p>
</div>
</div>
</div>
<div class="col-sm-6 col-md-4">
<div class="thumbnail">
<img data-src="holder.js/100%x200" alt="100%x200" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI/PjxzdmcgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB3aWR0aD0iMjQyIiBoZWlnaHQ9IjIwMCIgdmlld0JveD0iMCAwIDI0MiAyMDAiIHByZXNlcnZlQXNwZWN0UmF0aW89Im5vbmUiPjxkZWZzLz48cmVjdCB3aWR0aD0iMjQyIiBoZWlnaHQ9IjIwMCIgZmlsbD0iI0VFRUVFRSIvPjxnPjx0ZXh0IHg9IjkxLjc5Njg3NSIgeT0iMTAwIiBzdHlsZT0iZmlsbDojQUFBQUFBO2ZvbnQtd2VpZ2h0OmJvbGQ7Zm9udC1mYW1pbHk6QXJpYWwsIEhlbHZldGljYSwgT3BlbiBTYW5zLCBzYW5zLXNlcmlmLCBtb25vc3BhY2U7Zm9udC1zaXplOjExcHQ7ZG9taW5hbnQtYmFzZWxpbmU6Y2VudHJhbCI+MjQyeDIwMDwvdGV4dD48L2c+PC9zdmc+" data-holder-rendered="true" style="height: 200px; width: 100%; display: block;">
<div class="caption">
<h3>Assassin's creed IV</h3>
<p>sed quia non numquam eius modi tempora incidunt ut labore et dolore magnam aliquam quaerat voluptatem. Ut enim ad minima veniam, quis nostrum exercitationem ullam corporis suscipit laboriosam, nisi ut aliquid ex ea commodi consequatur? Quis autem vel eum iure reprehenderit qui in ea vo</p>
<p><a href="games/assassins-creed" class="btn btn-default" role="button">Button</a></p>
</div>
</div>
</div>
</div>