Está dando erro ao rodar o site, dizendo que o index não existe. Meu código:
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class SeriesController extends Controller
{
public function index() {
$series = [
'Grey\'s Anatomy',
'Lost',
'Agents of SHIELD'
];
return view ('series.index', [
'series' => $series
]);
}
}
O erro:
Method App\Http\Controllers\SeriesController::index does not exist.
http://127.0.0.1:8000/series
Hide solutions
Database name
seems incorrect
You're using the default database name laravel. This database does not exist.
Edit the .env file and use the correct database name in the DB_DATABASE key.