Jump to content

Laravel Routing


Recommended Posts


I am a newbie to Laravel and trying to familiarize myself with it, so I am starting with a CBT project and when I navigate to, it keeps taking me to laravel news page which differ from my project page.

Here is my web.php


use Illuminate\Foundation\Application;
use Illuminate\Support\Facades\Route;
use Inertia\Inertia;

use App\Http\Controllers\QuestionController;

Route::get('questions', [QuestionController::class, 'index'])->name('questions.index');
Route::get('questions/create', [QuestionController::class, 'create'])->name('questions.create');
Route::post('questions', [QuestionController::class, 'store'])->name('questions.store');

Route::get('/', function () {
    return Inertia::render('Welcome', [
        'canLogin' => Route::has('login'),
        'canRegister' => Route::has('register'),
        'laravelVersion' => Application::VERSION,
        'phpVersion' => PHP_VERSION,

])->group(function () {
    Route::get('/dashboard', function () {
        return Inertia::render('Dashboard');


And here is the page I keeps loading to

Please advise and if I could get a comprehensive tutorial that will guide me to pass the hurdles. I find it a bit difficult but with its authentication built in, it is okay.



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.