Adefinir  Finale
web.php
Go to the documentation of this file.
1 <?php
2 
3 use App\Http\Controllers\UserController;
5 use App\Models\scripts\RefreshRequestChart;
6 
7 session_start();
8 /*
9 |--------------------------------------------------------------------------
10 | Web Routes
11 |--------------------------------------------------------------------------
12 |
13 | Here is where you can register web routes for your application. These
14 | routes are loaded by the RouteServiceProvider within a group which
15 | contains the "web" middleware group. Now create something great!
16 |
17 */
18 
19 
20 /* ------------------------------------------------------------------------
21 | Public routing */
22 Route::get("/", [ UserController::class, 'signin' ] ) -> name("signin");
23 Route::get('welcome', [ UserController::class, "welcome" ] ) ->name("welcome");
24 Route::get("game", [ UserController::class, "game" ] ) -> name("game");
25 Route::get("logs", function(){
26  return view('logs')->with('game',$_SESSION['gameController']);
27 });
28 Route::post("ajax_requests", [AjaxRequest::class, "request" ] ) -> name("ajax_requests");
29 Route::post("refreshChart", [RefreshRequestChart::class, "request" ] ) -> name("ajax_requests");
30 Route::get("results", [ UserController::class, "results" ] ) -> name("results");
31 
32 
33 Route::get("chart", function () {
34  return view('chart')->with( 'game', $_SESSION['gameController'] );
35 });
36 
37 Route::get('signin', [ UserController::class, 'signin' ] ) -> name("signin");
38 Route::get('signup', [ UserController::class, 'signup' ] ) -> name("signup");
39 Route::get('infos', [ UserController::class, 'infos'] ) -> name("infos");
40 
41 Route::post('authenticate', [ UserController::class, 'authenticate' ] ) -> name("authenticate");
42 Route::post('adduser', [ UserController::class, 'adduser' ] ) -> name("adduser");
43 
44 Route::get('formpassword', [ UserController::class, "formpassword" ] ) -> name("formpassword");
45 Route::post('changepassword', [ UserController::class, "changePassword" ] ) -> name("changepassword");
46 
47 Route::get('deleteuser', [ UserController::class, "deleteUser" ] ) -> name("deleteuser");
48 Route::get('signout', [ UserController::class, "signout" ] ) -> name("signout");
49 
App\Models\scripts\AjaxRequest
Definition: AjaxRequest.php:14