Home » Php » laravel – Method Illuminate\Routing\Route::resource does not exist. In Macroable.php line 78

laravel – Method Illuminate\Routing\Route::resource does not exist. In Macroable.php line 78

Posted by: admin February 25, 2020 Leave a comment

Questions:

I’m trying to see the help of php artisan make:controller --help method but I get this error:

In Macroable.php line 78:
Method Illuminate\Routing\Route::resource does not exist.

How to&Answers:

Ok, I found the problem. I just needed to import this:
use Illuminate\Support\Facades\Route;

I don’t know why it wasn’t there when I created the project. Btw I’m using Laravel 5.8