• Developer New

    Friday, March 24, 2017

    how to use Redirects in laravel

    return Redirect::to('foo/bar');
    return Redirect::to('foo/bar')->with('key', 'value');
    return Redirect::to('foo/bar')->withInput();
    return Redirect::to('foo/bar')->withInput(Input::except('password'));
    return Redirect::to('foo/bar')->withErrors($validator);
    return Redirect::back();
    return Redirect::route('foobar');
    return Redirect::route('foobar', ['value']);
    return Redirect::route('foobar', ['key' => 'value']);
    return Redirect::action('FooController@index');
    return Redirect::action('FooController@baz', ['value']);
    return Redirect::action('FooController@baz', ['key' => 'value']);
    // If intended redirect is not defined, defaults to foo/bar.return Redirect::intended('foo/bar');

    No comments:

    Post a Comment

    Fashion

    Beauty

    Travel