routes.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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('welcome');
  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. //
  27. });
  28. Route::group(['middleware' => 'web'], function () {
  29. Route::auth();
  30. Route::resource('user', 'UserController');
  31. Route::get('/home', 'HomeController@index');
  32. Route::resource('post', 'PostController', ['except' => ['show', 'edit', 'update']]);
  33. Route::get('post/tag/{tag}', 'PostController@indexTag');
  34. Route::resource('corpus', 'CorpusController');
  35. Route::resource('sentence', 'SentenceController');
  36. Route::resource('tag', 'TagController');
  37. Route::resource('query', 'QueryController');
  38. });