davy_yg's avatar
Level 27

old function

Hello,

I cannot understand what this code means:

old('positionId')

I also cannot understand the definition:

function old($key = null, $default = null)
    {
        return app('request')->old($key, $default);
    }

Thanks in advance.

0 likes
2 replies
vivekdhumal's avatar

this function helps you retrieve old input from previous request, mostly use to show previous submitted data on form with validation error, so that end user don't need to re-enter the details.

Please or to participate in this conversation.