Support the ongoing development of Laravel.io →
posted 10 years ago
Requests
Last updated 2 years ago.
0

Hey there,

I encountered the same problem, so I did some digging.

Turns out the route scan command calls scans on another RouteServiceProvider (located at: vendor\laravel\framework\src\Illuminate\Foundation\Support\Providers\RouteServiceProvider.php), which in turn attempts to return its $this->scan.

I tried to modify that value, which did little, as it always returned only the HomeController, Authcontroller and PasswordControler. But, if you modify the function to directly return the array you want to return like this:

public function scans()
	{
		return
                ['App\Http\Controllers\HomeController',
		'App\Http\Controllers\Auth\AuthController',
		'App\Http\Controllers\Auth\PasswordController',
                'App\Http\Controllers\PagesController'];
	}

the scan function works. This is, of course, a dirty workaround that shouldn't be used in a serious environment.

Last updated 2 years ago.
0

Maybe you should try this.

Run this command on the command line in your project folder:

php artisan route:scan

If this isn't working, than try to run:

php artisan clear-compiled
php artisan route:scan

This worked for me.

Last updated 2 years ago.
0

I've got the same problem. Also tried to get the routes.php to work with uncommenting

require app_path('Http/routes.php');

in the RoutesServiceProvider and adding routes the Laravel 4 way, but that didn't work either.

Last updated 2 years ago.
0

nberlijn said:

Maybe you should try this.

Run this command on the command line in your project folder:

php artisan route:scan

If this isn't working, than try to run:

php artisan clear-compiled php artisan route:scan

This worked for me.

For me too, Thx

Last updated 2 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

mejlo mejlo Joined 27 May 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.