diff --git a/SRC/app/Http/Controllers/GameController.php b/SRC/app/Http/Controllers/GameController.php index 2c18d91..35d34fc 100755 --- a/SRC/app/Http/Controllers/GameController.php +++ b/SRC/app/Http/Controllers/GameController.php @@ -22,4 +22,29 @@ class GameController extends Controller { 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]); + } + + } diff --git a/SRC/app/Http/Controllers/LoginController.php b/SRC/app/Http/Controllers/LoginController.php index 74a61f3..d83a98a 100755 --- a/SRC/app/Http/Controllers/LoginController.php +++ b/SRC/app/Http/Controllers/LoginController.php @@ -71,9 +71,9 @@ class LoginController extends Controller { switch ($response = Password::remind(Input::only('email'))) { case Password::INVALID_USER: - return redirect('oublie')->withErrors($response)->withInput(); + return redirect('forgotten')->withErrors($response)->withInput(); case Password::REMINDER_SENT: - return redirect('oublie')->withStatus($response)->withInput(); + return redirect('forgotten')->withStatus($response)->withInput(); } } diff --git a/SRC/app/Http/routes.php b/SRC/app/Http/routes.php index 1821e10..0d259ed 100755 --- a/SRC/app/Http/routes.php +++ b/SRC/app/Http/routes.php @@ -12,24 +12,26 @@ */ 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::get('login', 'LoginController@index'); Route::post('login', 'LoginController@authenticate'); - Route::get('oublie', 'LoginController@forgottenPassword'); - Route::post('oublie', 'LoginController@initPassword'); + Route::get('forgotten', 'LoginController@forgottenPassword'); + Route::post('forgotten', 'LoginController@initPassword'); }); - Route::group(['middleware' => 'auth'], function () { Route::get('referent', 'ReferentController@index'); - Route::get('logout', 'LoginController@logout'); + Route::get('logout', 'LoginController@logout'); }); Route::group(['middleware' => 'admin'], function () { Route::get('admin', 'AdminController@index'); + Route::post('logout', 'LoginController@logout'); }); diff --git a/SRC/config/database.php b/SRC/config/database.php index c9c176a..ffdb1f8 100755 --- a/SRC/config/database.php +++ b/SRC/config/database.php @@ -55,9 +55,9 @@ return [ 'mysql' => [ 'driver' => 'mysql', 'host' => env('DB_HOST', 'localhost'), - 'database' => env('DB_DATABASE', ''), - 'username' => env('DB_USERNAME', ''), - 'password' => env('DB_PASSWORD', ''), + 'database' => env('DB_DATABASE', 'moduleweb'), + 'username' => env('DB_USERNAME', 'root'), + 'password' => env('DB_PASSWORD', 'malibu81'), 'charset' => 'utf8', 'collation' => 'utf8_unicode_ci', 'prefix' => '', diff --git a/SRC/resources/views/auth/login.blade.php b/SRC/resources/views/auth/login.blade.php index 75aa9d0..167b84c 100755 --- a/SRC/resources/views/auth/login.blade.php +++ b/SRC/resources/views/auth/login.blade.php @@ -51,7 +51,7 @@ Login - Mot de passe oublié? + Mot de passe oublié? diff --git a/SRC/resources/views/home.blade.php b/SRC/resources/views/home.blade.php index 131534a..01b76a4 100755 --- a/SRC/resources/views/home.blade.php +++ b/SRC/resources/views/home.blade.php @@ -26,13 +26,13 @@