Home>

At the initial display in laravel, we are thinking of a series of flow to display the value acquired from DB, change the value and save.

The entered value is checked by validation, and if there is an error, it returns to the input screen, but it is done.
However, since I want to keep the entered value, I would like to display the value if it was entered using old on the controller.
I want to use old with controller instead of balde.

I'm writing this now, but it doesn't work.

function hogehoge (HogeRequest $request) {
    ....
    ....
    // name is hoge_name but it doesn't work ... the name isn't different
    $request->old ('hoge_name');
    ....
    ....
}


$request->session ()->all ();

[_flash] =>Array
        (
            [old] =>Array
                (
                    [0] =>_old_input
                    [1] =>errors
                )
            [new] =>Array
                (
                )
        )
...
...
...
    [_old_input] =>Array
        (
            [hoge_name] =>12345


There is something in _old_input.
How can I get it on the controller side?
Please teach me.