路由是这么写的:Route::get('student/index',['uses' => 'StudentController@index']);
控制器StudentController.php
<?php
namespace App\Http\Controller;
use App\Http\Controllers\Controller;
class StudentController extends Controller
{
public function index()
{
return view('student.index');
}
}
结果提示:
Whoops, looks like something went wrong.
1/1 ReflectionExceptionin Route.php line 264: Class App\Http\Controllers\StudentController does not exist
in Route.php line 264
atReflectionMethod->__construct('App\Http\Controllers\StudentController', 'index') in Route.php line 264
atRoute->signatureParameters('Illuminate\Database\Eloquent\Model') in Router.php line 859
atRouter->substituteImplicitBindings(object(Route)) in Router.php line 844
atRouter->substituteBindings(object(Route)) in Router.php line 827
atRouter->findRoute(object(Request)) in Router.php line 691
atRouter->dispatchToRoute(object(Request)) in Router.php line 675
qq_卡卡_35