BadMethodCallException方法App \ Http \ Controllers \ SiteController :: index @ index不存在
问题描述:
I can not find the error:
My Controller:
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class SiteController extends Controller{
public function index(){
return 'Home page do site';
}
}
My Route:
答
You have not defined the route. we define route "web.php" of our laravel file.
Route::get('/index', 'SiteController@index')->name('home');
this migght work for you.