Question

I've created my route:

Route::get('fichas/orden/{id}', 'FichaController@orden');

My Controller:

public function orden($id)
{
    return $id;
}

And I have this in my View:

{{ link_to_route('fichas.orden', 'Guardar orden', array($ficha->id), array('class' => 'btn btn-primary')) }}

And I don't know why I'm having this error. I have been using this kind of routes and views all the time and I haven't got any problem until now. Does anybody know why it doesn't work now?

Was it helpful?

Solution

If you want to link to a named route, you have to define the route as follows:

Route::get('fichas/orden/{id}', array('as'=>'fichas.orden', 'uses'=>'FichaController@orden'));
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top