I'm following a tutorial, for creating a Rest application in Laravel , in the second part of this tutorial Laravel -parte2 , when I use the command:
php artisan route:list
Displays this error
PHP Fatal error: Class 'App\Http\Controllers\Controller' not found in C:\xampp\htdocs\laravel-api\app\Http\Controllers\JobsController.php on line 11
[Symfony\Component\Debug\Exception\FatalErrorException]
Class 'App\Http\Controllers\Controller' not found
My controlller
class JobsController extends Controller{
public function index()
{
$jobs = Job::with('company')->get();
return response()->json($jobs);//retornando um tipo json
}
class CompaniesController extends Controller{
public function index()
{
$companies = Company::all();
return response()->json($companies);
}
If anyone knows any other tutorial for me to draw too, I'm available.