web.php 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. use App\Http\Controllers\DashboardController;
  3. use App\Http\Controllers\IdeaController;
  4. use App\Http\Controllers\CommentController;
  5. use App\Http\Controllers\ProfileController;
  6. use Illuminate\Support\Facades\Route;
  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 and all of them will
  14. | be assigned to the "web" middleware group. Make something great!
  15. |
  16. */
  17. Route::get('/', [DashboardController::class, 'index'])->name('ideas.index');
  18. Route::resource('ideas', IdeaController::class)->except(['index', 'create', 'show'])->middleware('auth');
  19. Route::resource('ideas', IdeaController::class)->only(['show']);
  20. Route::resource('ideas.comments', CommentController::class)->only(['store', 'destroy'])->middleware('auth');
  21. Route::get('/terms', function (){
  22. return view('terms');
  23. });