문제

I'm trying to make a link work in laravel 4, the link is:

<a href="NieuweTaak">Nieuwe taak</a>

This link will result in

laravel/ToDo/public/NieuweTaak

My routing is:

Route::get('NieuweTaak', 'showView@NieuweTaakController');

My controller:

class NieuweProductController extends BaseController{


public function showView()
{
    return View::make('newTask');
}

}

But somehow when i click the link it gives a NotFoundHTTP exception

도움이 되었습니까?

해결책

Your class is NieuweProductController, while your rout says NieuweTaakController

I think you should correct it to (or change the class name):

Route::get('NieuweTaak', 'NieuweProductController@showView');

Btw, action goes after the controller name, it's className@method

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top