简体   繁体   English

获取Symfony \\组件\\ HttpKernel \\异常\\ NotFoundHttpException

[英]Getting Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException

I know this error and it is a routing error but I copy and pasted the route six times and three work and three don't. 我知道此错误,这是一个路由错误,但是我将路由复制并粘贴了六次,但三项工作却三项没有。

Route::get('/reps-distributors', 'PagesController@reps');
Route::get('/reps-distributors/usa', 'PagesController@repsUSA');
Route::get('/reps-distributors/netherlands', 'PagesController@repsNetherlands');
Route::get('/reps-distributors/middleeast', 'PagesController@repsMiddleEast');
Route::get('/reps-distributors/mexico', 'PagesController@repsMexico');
Route::get('/reps-distributors/fareast', 'PagesController@repsFarEast');
Route::get('/reps-distributors/europe', 'PagesController@repsEurope');

The tree causing me problems are mexico, fareast, and europe. 给我造成麻烦的树是墨西哥,远东和欧洲。

Below is the controller page 以下是控制器页面

 /**
 * Show the reps-distributors page
 *
 * @return Response
 */
public function reps()
{
    return View::make('reps');

}

/**
 * Show the reps-distributors page
 *
 * @return Response
 */
public function repsUSA()
{
    return View::make('reps/usa');

}

/**
 * Show the reps-distributors page
 *
 * @return Response
 */
public function repsNetherlands()
{
    return View::make('reps/netherlands');

}

/**
 * Show the reps-distributors page
 *
 * @return Response
 */
public function repsMiddleEast()
{
    return View::make('reps/middleeast');

}

/**
 * Show the reps-distributors page
 *
 * @return Response
 */
public function repsMexico()
{
    return View::make('reps/mexico');

}

/**
 * Show the reps-distributors page
 *
 * @return Response
 */
public function repsFarEast()
{
    return View::make('reps/fareast');

}

/**
 * Show the reps-distributors page
 *
 * @return Response
 */
public function repsEurope()
{
    return View::make('reps/europe');

}

I just don't understand because they all look the same they should work the same. 我只是不明白,因为它们看起来都一样,应该工作相同。

Here is one of the broken view pages: 这是其中一个损坏的视图页面:

<h1>Reps &amp; Distributors</h1>

<h3>Mexico</h3>

<h4>Distributors</h4>

Here is the link: 链接在这里:

<p><a href="/reps-distibutors/mexico">Mexico</a></p>

There is a typo in your link. 您的链接中有错字。 Instead of 代替

<p><a href="/reps-distibutors/mexico">Mexico</a></p>

you need to write 你需要写

<p><a href="/reps-distributors/mexico">Mexico</a></p>

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Symfony\Component\HttpKernel\Exception\NotFoundHttpException - Symfony\Component\HttpKernel\Exception\NotFoundHttpException Symfony \\组件\\ HttpKernel \\异常\\ NotFoundHttpException - Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException 异常:“Symfony\Component\HttpKernel\Exception\NotFoundHttpException”,...} - exception: "Symfony\Component\HttpKernel\Exception\NotFoundHttpException",…} "{消息:“”,异常:“Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException”,...}" - {message: "", exception: "Symfony\Component\HttpKernel\Exception\NotFoundHttpException",…} 异常:“Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException”,... - exception: "Symfony\Component\HttpKernel\Exception\NotFoundHttpException",… Laravel 4错误Symfony \\组件\\ HttpKernel \\异常\\ NotFoundHttpException - Laravel 4 Error Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException Laravel错误Symfony \\ Component \\ HttpKernel \\ Exception \\ NotFoundHttpException - Laravel error Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException Laravel中的Symfony \\ Component \\ HttpKernel \\ Exception \\ NotFoundHttpException错误 - Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException Error in Laravel Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException Laravel - Symfony\Component\HttpKernel\Exception\NotFoundHttpException Laravel Symfony \\组件\\ HttpKernel \\异常\\ NotFoundHttpException Laravel 4.1 - Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException Laravel 4.1
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM