我已经创建了一个视图,它是在文件夹userprofile
。我试着显示视图,当我输入url时它没有给我一些错误,但它没有显示任何东西,它停留在同一个页面上。
这是我在控制器
中的函数public function viewChangePassword(){
return view('userprofile.changepassword');
}
和路由
Route::get('/userprofile/changepassword','userProfileController@viewChangePassword');
你可以试着看看它是否有效:
Route::get('userprofile/changepassword',
['uses' => 'userProfileController@viewChangePassword']);
如果你有一个指向该路由的href链接,你应该使用:
Route::get('userprofile/changepassword',
['uses' => 'userProfileController@viewChangePassword','as' => 'change_password']);
并命名为:
<a href="{{route('change_password'}}">Change Password</a>