Added a return in DatabaseController when a error occurs (#1742)
* Added a return in DatabaseController when a error occurs * add return on database update too
This commit is contained in:
parent
1922db60db
commit
88c5bb4f97
|
@ -131,7 +131,7 @@ class DatabaseController extends Controller
|
||||||
sprintf('There was an error while trying to connect to the host or while executing a query: "%s"', $exception->getMessage())
|
sprintf('There was an error while trying to connect to the host or while executing a query: "%s"', $exception->getMessage())
|
||||||
)->flash();
|
)->flash();
|
||||||
|
|
||||||
redirect()->route('admin.databases')->withInput($request->validated());
|
return redirect()->route('admin.databases')->withInput($request->validated());
|
||||||
} else {
|
} else {
|
||||||
throw $exception;
|
throw $exception;
|
||||||
}
|
}
|
||||||
|
@ -165,7 +165,7 @@ class DatabaseController extends Controller
|
||||||
$this->alert->danger(
|
$this->alert->danger(
|
||||||
sprintf('There was an error while trying to connect to the host or while executing a query: "%s"', $exception->getMessage())
|
sprintf('There was an error while trying to connect to the host or while executing a query: "%s"', $exception->getMessage())
|
||||||
)->flash();
|
)->flash();
|
||||||
$redirect->withInput($request->normalize());
|
return $redirect->withInput($request->normalize());
|
||||||
} else {
|
} else {
|
||||||
throw $exception;
|
throw $exception;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue