0
votes

I've read several answers to this question, and none of them apply to my situation as my route is very simple.

Here is the controller code (controller created using aritsan:make): listapp/app/Http/Controllers/TestController.php

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class TestController extends Controller
{

    public function test () {
        return view('lookma');
    }
}

here is the web routes file: listapp/routes/web.php


<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});

Route::get('/lookma', 'TestContoller@test');

Things I've tried: - Look for typos or unclosed enclosures - cleared the cache - ran dump-autoload - changed the namespace from App to app in case is was a casing issue

I'm not sure why it is having this issue as everything seems to be matching up. I'm running Xubuntu 19.04 and PHP 7.4

2
you have a typo in your route: TestContoller should be TestController.Remul
Easy to miss typo in your route definition, it says TestContoller@test instead of TestControllerAlec Joy
You've a typo in your code. Check the spelling of TestContoller@test. I think it should be TestController@testiamimran
This should be closed since it is nothing more than a typolagbox

2 Answers

3
votes

I think you missed a letter in your route definition

It must be TestController not TestContoller. Here is the correct one:

Route::get('/lookma', 'TestContoller@test');
2
votes

Typo mismatch. you can copy below line

Route::get('/lookma', 'TestController@test');