Laravel

Laravel: Usage of old() in form when editing

Best practice to show old value when editing a form in Laravel?
Laravel function old have default parameter if no old data found in session default value will be displayed.

function old($key = null, $default = null)

Replace expression in template with the default object data.

<input name="title" value="{{old('title', $post->title)}}" />



Further Resources:
How to Hire a Great Laravel Developer

Author: Danyal
I'm skilled programmer with expertise in Vue.js/Nux.js for front-end development and PHP Laravel for back-end development. I excel in building APIs and services, and also have experience in web server setup & maintenance. My versatile skill set allows you to develop and maintain web applications effectively, from the user interface to the server-side functionality. I love coding with never ending learning attitude, thanks for visiting danya.dk