redirect to show page after create/update

This commit is contained in:
denisdulici 2020-04-02 10:25:19 +03:00
parent 9af71ddb55
commit c5cfc42a7c
2 changed files with 3 additions and 3 deletions

View File

@ -126,7 +126,7 @@ class Bills extends Controller
$response = $this->ajaxDispatch(new CreateBill($request));
if ($response['success']) {
$response['redirect'] = route('bills.index');
$response['redirect'] = route('bills.show', $response['data']->id);
$message = trans('messages.success.added', ['type' => trans_choice('general.bills', 1)]);
@ -221,7 +221,7 @@ class Bills extends Controller
$response = $this->ajaxDispatch(new UpdateBill($bill, $request));
if ($response['success']) {
$response['redirect'] = route('bills.index');
$response['redirect'] = route('bills.show', $response['data']->id);
$message = trans('messages.success.updated', ['type' => trans_choice('general.bills', 1)]);

View File

@ -224,7 +224,7 @@ class Invoices extends Controller
$response = $this->ajaxDispatch(new UpdateInvoice($invoice, $request));
if ($response['success']) {
$response['redirect'] = route('invoices.index');
$response['redirect'] = route('invoices.show', $response['data']->id);
$message = trans('messages.success.updated', ['type' => trans_choice('general.invoices', 1)]);