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

antranapp picture antranapp  路  3Comments

benny-sun picture benny-sun  路  3Comments

MarKco picture MarKco  路  3Comments

abufalbo picture abufalbo  路  3Comments

chenyongmin picture chenyongmin  路  3Comments