Question

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"

Was it helpful?

Solution

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

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top