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

bazie's avatar
Level 1

NotFoundHttpException in RouteCollection.php line 161:

Hello, I use Infyom to generate CRUD of my laravel application. After installing the crud generator, among all my routes, only the "welcome" is working. the error message is that:

NotFoundHttpException in RouteCollection.php line 161:

in RouteCollection.php line 161 at RouteCollection->match(object(Request)) in Router.php line 766 at Router->findRoute(object(Request)) in Router.php line 621 at Router->dispatchToRoute(object(Request)) in Router.php line 607 at Router->dispatch(object(Request)) in Kernel.php line 268 at Kernel->Illuminate\Foundation\Http{closure}(object(Request)) in Pipeline.php line 53 at Pipeline->Illuminate\Routing{closure}(object(Request)) in CheckForMaintenanceMode.php line 46 at CheckForMaintenanceMode->handle(object(Request), object(Closure)) in Pipeline.php line 137 at Pipeline->Illuminate\Pipeline{closure}(object(Request)) in Pipeline.php line 33 at Pipeline->Illuminate\Routing{closure}(object(Request)) in Pipeline.php line 104 at Pipeline->then(object(Closure)) in Kernel.php line 150 at Kernel->sendRequestThroughRouter(object(Request)) in Kernel.php line 117 at Kernel->handle(object(Request)) in index.php line 54

0 likes
6 replies
bazie's avatar
Level 1

ok thank you <?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('generator_builder', '\InfyOm\GeneratorBuilder\Controllers\GeneratorBuilderController@builder');

Route::get('field_template', '\InfyOm\GeneratorBuilder\Controllers\GeneratorBuilderController@fieldTemplate');

Route::post('generator_builder/generate', '\InfyOm\GeneratorBuilder\Controllers\GeneratorBuilderController@generate');

Auth::routes();

Route::get('/home', 'HomeController@index');

Route::get('essai', function () { return view('essai'); }); Route::resource('villes', 'VilleController');

vipin93's avatar

simple things route not defind check by php artisan route:lits

bazie's avatar
Level 1

Please I don't understand what you say, when I check php artisan route:list, i see all the routes I define.

bazie's avatar
Level 1

I notice that if I add index.php before route name, the link work correctly.

somnathsah's avatar

It seems like the issue is with the path you are using for the controller method. For example you are using

Route::get('generator_builder', '\InfyOm\GeneratorBuilder\Controllers\GeneratorBuilderController@builder');

But if you are following the standard folder structure of LARAVEL for controller then your controller class should be in app\Http\Controllers\ directory.

and then you would be able create the route as below.

Route::get('generator_builder',  'GeneratorBuilderController@builder');

Please or to participate in this conversation.