Laravel 5 redirect back to custom url with params

I have Website A WordPress and posting to API (Laravel).
The Api validates, but if incorrect i want to redirect back to that url including the posts. I have tried like this:

    $validator = Validator::make($request::all(), [
        'name'  => 'required',
    ]);

    if ($validator->fails())
    {
        return redirect()->back()->withInput();
    }

But in the WP site i var_dump($_POST) but doesn’t see anything.

How can i achieve that in the Laravel way?

Read more here: Laravel 5 redirect back to custom url with params

Leave a Reply

Your email address will not be published. Required fields are marked *