Adefinir  1
web.php
Go to the documentation of this file.
1 <?php
2 
3 use App\Http\Controllers\UserController;
5 
6 session_start();
7 /*
8 |--------------------------------------------------------------------------
9 | Web Routes
10 |--------------------------------------------------------------------------
11 |
12 | Here is where you can register web routes for your application. These
13 | routes are loaded by the RouteServiceProvider within a group which
14 | contains the "web" middleware group. Now create something great!
15 |
16 */
17 
18 
19 /* ------------------------------------------------------------------------
20 | Public routing */
21 //Route::get('/', 'UserController@signin');
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 
30 Route::get("chart", function () {
31  return view('chart')->with( 'game', $_SESSION['gameController'] );
32 });
33 //Route::get("/chart",[UserController::class, 'chart']) -> name("chart");
34 
35 Route::get('signin', [ UserController::class, 'signin' ] ) -> name("signin");
36 Route::get('signup', [ UserController::class, 'signup' ] ) -> name("signup");
37 Route::get('infos', [ UserController::class, 'infos'] ) -> name("infos");
38 
39 Route::post('authenticate', [ UserController::class, 'authenticate' ] ) -> name("authenticate");
40 Route::post('adduser', [ UserController::class, 'adduser' ] ) -> name("adduser");
41 
42 Route::get('formpassword', [ UserController::class, "formpassword" ] ) -> name("formpassword");
43 Route::post('changepassword', [ UserController::class, "changePassword" ] ) -> name("changepassword");
44 
45 Route::get('deleteuser', [ UserController::class, "deleteUser" ] ) -> name("deleteuser");
46 Route::get('signout', [ UserController::class, "signout" ] ) -> name("signout");
47 
48 // ------------------------------------------------------------------------
49 
50 /* ------------------------------------------------------------------------
51 | Admin routing */
52 //Route::prefix('admin')->middleware('myuser.auth')->group( function() {
53 
54 
55  /* Route::get('formpassword', [ UserController::class, "formpassword" ] ) -> name("formpassword");
56  Route::post('changepassword', [ UserController::class, "changePassword" ] ) -> name("changepassword");
57  Route::get('deleteuser', [ UserController::class, "deleteUser" ] ) -> name("deleteuser");
58  Route::get('signout', [ UserController::class, "signout" ] ) -> name("signout"); */
59 
60 //});
61 // -----
App\Models\scripts\AjaxRequest
Definition: AjaxRequest.php:15