redirect to show page after create/update
This commit is contained in:
parent
9af71ddb55
commit
c5cfc42a7c
@ -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)]);
|
||||
|
||||
|
@ -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)]);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user