routes.php 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. /*
  3. |--------------------------------------------------------------------------
  4. | Routes File
  5. |--------------------------------------------------------------------------
  6. |
  7. | Here is where you will register all of the routes in an application.
  8. | It's a breeze. Simply tell Laravel the URIs it should respond to
  9. | and give it the controller to call when that URI is requested.
  10. |
  11. */
  12. Route::get('/', function () {
  13. return view('home');
  14. });
  15. /*
  16. |--------------------------------------------------------------------------
  17. | Application Routes
  18. |--------------------------------------------------------------------------
  19. |
  20. | This route group applies the "web" middleware group to every route
  21. | it contains. The "web" middleware group is defined in your HTTP
  22. | kernel and includes session state, CSRF protection, and more.
  23. |
  24. */
  25. Route::group(['middleware' => 'web'], function () {
  26. Route::auth();
  27. Route::get('/home', 'HomeController@index');
  28. Route::get('/', 'HomeController@index');
  29. Route::get('/chat', 'chatpageController@index');
  30. Route::get('user/{id}', 'UserController@showProfile');
  31. Route::resource('games', 'GameController', ['only' => ['update', 'show']]);
  32. Route::resource('training', 'TrainingController', ['only' => ['update', 'show']]);
  33. Route::get('/home/start', 'GameController@store');
  34. Route::get('/home/training', 'TrainingController@store');
  35. Route::get('/postags', 'PostagController@index');
  36. Route::get('/textes', 'TexteController@index');
  37. Route::get('/stats', 'StatsController@index');
  38. Route::get('contact', 'ContactController@showForm');
  39. Route::post('contact', 'ContactController@sendContactInfo');
  40. });
  41. Route::post('sendmessage', 'chatController@sendMessage');
  42. Route::get('admin', ['middleware' => 'admin', 'uses' => 'AdminController@index']);
  43. //Route::get('admin', ['uses' => 'AdminController@index', 'middleware' => 'auth']);
  44. //Route::post('/send', 'EmailController@send');