samedi 18 février 2017

Laravel redirect after update

I have an update action in a controller called AssetController.

At the end of the action I do return \Redirect::route('asset.edit', array($id));

In my Routes I have Route::resource('asset', 'AssetController');

When I post to the update action it takes me to "/asset/8" (8 being the id of that asset record). I want it to go to "/asset/8/edit" -- in other words simply returning the user to the edit form that they just submitted for update.

I also tried return \Redirect::back() but that also sends to "/asset/8" -- even thought the URL of the page they just submitted was "/asset/8/edit".

Why is this not working?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2l7noxh
via IFTTT

Aucun commentaire:

Enregistrer un commentaire