Laravel-admin: Controlling the redirect after save

Created on 16 Mar 2017  ·  1Comment  ·  Source: z-song/laravel-admin

Hi,
I want to controll the redirect after the save.
I want the user to stay on the same form he is editing.

I have done it as the following, but then I loose the "update success" green message.

            $form->saved(function(Form $form){
                return redirect('/admin/assignments/'.$form->model()->id.'/edit');
            });

What is the correct way to redirect after submit.
Thanks

Most helpful comment

update laravel-admin and use:

admin_toastr('update success');
return redirect('/admin/assignments/'.$form->model()->id.'/edit');

>All comments

update laravel-admin and use:

admin_toastr('update success');
return redirect('/admin/assignments/'.$form->model()->id.'/edit');
Was this page helpful?
0 / 5 - 0 ratings

Related issues

evans-kim picture evans-kim  ·  3Comments

amun1303 picture amun1303  ·  3Comments

clock1129 picture clock1129  ·  3Comments

donglianyou picture donglianyou  ·  3Comments

antranapp picture antranapp  ·  3Comments