I need to perform CRUD operations on certain places in my application that are contained within other forms. For this I will use AJAX to update the views containing the "sub-content".
I'm using the Resource Controllers
methods of Laravel 4 to control routes from the standard Framework methods:
To better illustrate the scenario: There is a business register that has n people assigned to this company.
The view cadastro.empresas.edit
has a form with company data and within that view I have a div that will work people being updated by AJAX according to CRUD operations.
The problem:
When I make a return Redirect::action('PessoasController@show', array('id' => $pessoa->id));
I need the request method to be GET
, but since the original request (update) is a PUT
I end up falling into an infinite loop.
How do I indicate which method I want to use when calling a Redirect::action()
?