0
votes

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>
1
There must be something wrong in your view files. Can you post the code of the view reps/mexico? - lowerends
<h1>Reps &amp; Distributors</h1> <h3>Mexico</h3> <h4>Distributors</h4> - bradley_mann1
Can you paste the complete code in your question please? - lowerends
Of course sorry about that. - bradley_mann1
It may be a typo in your question, but you have reps-distibutors in the link (missing an s) instead of reps-distributors. - lowerends

1 Answers

0
votes

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>