web.php 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php
  2. use Illuminate\Support\Facades\Route;
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Web Routes
  6. |--------------------------------------------------------------------------
  7. |
  8. | Here is where you can register web routes for your application. These
  9. | routes are loaded by the RouteServiceProvider and all of them will
  10. | be assigned to the "web" middleware group. Make something great!
  11. |
  12. */
  13. // Главная страница
  14. Route::view('/', 'index');
  15. use App\Http\Controllers;
  16. use App\Http\Resources;
  17. use App\Models;
  18. // Публикации
  19. Route::get('/articles', [Controllers\ArticleController::class, 'published']);
  20. Route::get('/articles/edit', [Controllers\ArticleController::class, 'index']);
  21. Route::get('/article/add', [Controllers\ArticleController::class, 'add']);
  22. Route::get('/article/{article}', [Controllers\ArticleController::class, 'view']);
  23. Route::get('/article/{article}/delete', [Controllers\ArticleController::class, 'drop']);
  24. Route::get('/article/{article}/edit', [Controllers\ArticleController::class, 'edit']);
  25. Route::post('/article/{article}/edit', [Controllers\ArticleController::class, 'store']);
  26. Route::post('/article/{article}/comment', [Controllers\ArticleController::class, 'comment']);
  27. Route::post('/article/add', [Controllers\ArticleController::class, 'store']);
  28. // Модерация комментариев
  29. Route::get('/comments/moderation', [Controllers\CommentController::class, 'moderation']);
  30. Route::get('/comment/{comment}/allow', [Controllers\CommentController::class, 'allow']);
  31. Route::get('/comment/{comment}/reject', [Controllers\CommentController::class, 'reject']);