9/9/2017 - 7:46 PM

Override default redirect back route after error in validating requests

override the current default redirection route (that is redirect back) after receiving error in validating requests at controller level


class TestRequestController extends Controller;

protected function getRedirectUrl() {
      return '/#s5'; //route; #s5 is the id of a section as example. may use just the route only
public function store(Request $request) {
  $this->validate($request, [
    bla bla bla