0

Hi am having some sort of an issue, I created a controller and have registered it in my routes but the I keep getting an error when I try browsing to its page. The default show, create, destroy and update methods still work but the ones I create don't work I wish I knew what I am doing wrong.

The Error:

`Symfony \ Component \ HttpKernel \ Exception \ NotFoundHttpException
Controller method not found.`

My Route:

Route::Resource("impactnetwork","impactController");

Route::get("impactnetwork/itinerary","impactController@itinerary");

Route::get("impactnetwork/gallery","impactController@gallery");

Route::get("impactnetwork/lead","impactController@lead");

My Controller:

`public function itinerary()
 {

return View::make("pages/impactitinerary");
 }

 public function gallery()
 {

return View::make("pages/impactgallery");
 }

 public function lead()
 {

return View::make("pages/impactlead");
 }
`

I try to brwose:

www.mysite.dev/impactnetwork/itinerary

www.mysite.dev/impactnetwork/gallery

www.mysite.dev/impactnetwork/lead

But it keeps saying "Controller method not found"

1 Answer 1

4
Route::resource("impactnetwork","impactController");

This defines your controller as a Resourceful controller, which have limited amount of actions.

Sign up to request clarification or add additional context in comments.

1 Comment

Exactly - specifically it'll be registering some routes that probably override your later-defined routes, hence them not working as you would expect.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.