Skip to content

Commit

Permalink
fix redirection
Browse files Browse the repository at this point in the history
  • Loading branch information
uyab committed Sep 23, 2019
1 parent f36d242 commit 909e847
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/Http/Controllers/KabupatenController.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function update(Update $request, Kabupaten $kabupaten)
{
$kabupaten->update($request->validated());

return redirect()->back()->withSuccess('Kabupaten saved');
return redirect()->route('indonesia::kabupaten.edit', $kabupaten)->withSuccess('Kabupaten saved');
}

public function destroy(Kabupaten $kabupaten)
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Controllers/KecamatanController.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function update(Update $request, Kecamatan $kecamatan)
{
$kecamatan->update($request->validated());

return redirect()->back()->withSuccess('Kecamatan saved');
return redirect()->route('indonesia::kecamatan.edit', $kecamatan)->withSuccess('Kecamatan saved');
}

public function destroy(Kecamatan $kecamatan)
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Controllers/KelurahanController.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ public function update(Update $request, Kelurahan $kelurahan)
{
$kelurahan->update($request->validated());

return redirect()->back()->withSuccess('Kelurahan saved');
return redirect()->route('indonesia::kelurahan.edit', $kelurahan)->withSuccess('Kelurahan saved');
}

public function destroy(Kelurahan $kelurahan)
Expand Down
2 changes: 1 addition & 1 deletion src/Http/Controllers/ProvinsiController.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public function update(Update $request, Provinsi $provinsi)
{
$provinsi->update($request->validated());

return redirect()->route('indonesia::provinsi.show', $provinsi)->withSuccess('Provinsi saved');
return redirect()->route('indonesia::provinsi.edit', $provinsi)->withSuccess('Provinsi saved');
}

public function destroy(Provinsi $provinsi)
Expand Down

0 comments on commit 909e847

Please sign in to comment.