Skip to content

Instantly share code, notes, and snippets.

@MuhammadQuran17
Created October 28, 2025 09:50
Show Gist options
  • Select an option

  • Save MuhammadQuran17/f4f6bf674ff9ef4fc874c2c2163293b3 to your computer and use it in GitHub Desktop.

Select an option

Save MuhammadQuran17/f4f6bf674ff9ef4fc874c2c2163293b3 to your computer and use it in GitHub Desktop.
Very complex and Common issues

Laravel

Routes

  1. If you get 404, but everything is ok, then check the order of routes. Because:
Route::get('/{userChat?}', [AiChatController::class, 'index'])->name('index');
Route::get('/create', [AiChatController::class, 'create'])->name('create');

Will not work. Order is matter. Working solution:

Route::get('/create', [AiChatController::class, 'create'])->name('create');
Route::get('/{userChat?}', [AiChatController::class, 'index'])->name('index');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment