Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Randy_Johnson's avatar

Routes Error! View [PagesController@index] not found.

Folder structure:

app\Http\Controllers\Backend\Dashboard\PagesController.php

View Structure:

resources\views\backend\dashboard\index.blade.php
Route::namespace('Backend.Dashboard')->group(function () {
    Route::view('dashboard-index', 'PagesController@index')->name('dashboard-index');
});
<?php

namespace App\Http\Controllers\Backend\Dashboard;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;

class PagesController extends Controller
{
    /**
     * Show the application dashboard.
     *
     * @return \Illuminate\Contracts\Support\Renderable
     */
    public function index()
    {
        return "Hello world!";
    }
}
0 likes
2 replies

Please or to participate in this conversation.