我的Laravel-5.8应用程序中有以下代码:
控制器
<?php
namespace AppHttpControllersAppraisal;
class AppraisalRespondentsController extends Controller
{
public function proceedrespondent()
{
return View::make('appraisal.appraisal_respondents.proceedrespondent');
}
}
评估->评估_受访者->过程应答
路线:
Route::group(['prefix' => 'appraisal', 'as' => 'appraisal.', 'namespace' => 'Appraisal', 'middleware' => ['auth']], function () {
Route::get('appraisal_respondents/proceedrespondent', 'AppraisalRespondentsController@proceedrespondent')->name('appraisal_respondents.proceedrespondent');
}
当我点击这个
<a class="btn btn-info" href="{{ route("appraisal.appraisal_respondents.proceedrespondent") }}">
Display
</a>
以呈现页面。我得到了这个错误:
404 Not Found. Sorry, the page you are looking for could not be found. Go Back
这是我的路线:列表:
| GET|HEAD | appraisal/appraisal_respondents/proceedrespondent | appraisal.appraisal_respondents.proceedrespondent | AppHttpControllersAppraisalAppraisalRespondentsController@proceedrespondent | web,auth |
我该如何解决?
感谢
只需使用路由名称
<a class="btn btn-info" href="{{
route("appraisal_respondents.proceedrespondent") }}">
Display
</a>