1

I am working with laravel 4 and I have to create links that invoke the methods of the controller passing data to the controller.

I chose to use the link_to_action, but failed to work.

This is the my HTML code:

{{link_to_action('ResearchController@access_data', 'Dati Accesso', array('dati'=>'id'), array('class' => 'btn btn-default'));}}

and I want connect this link to the access_data method in my ResearchController and I want to pass some parameters present in array('dati'=>'id').

Cœur
  • 37,241
  • 25
  • 195
  • 267
sircamp
  • 107
  • 2
  • 10

1 Answers1

0

Try this:

{{ HTML::linkAction('ResearchController@access_data', 'Dati Accesso' , array('dati'=>'id', 'class' => 'btn btn-default')) }}
Laurence
  • 58,936
  • 21
  • 171
  • 212