是否可以像输入一样返回数据库数据并将其与{{old()}} laravel一起使用?

I have articles database table and need same form for both saving new article and updating old one. So I have made a forms folder and created my form, then I included it in both places i needed, but in article edit I need to see all article which i am editing info (title, article content, etc.) and that info is saved in database. It would be the best if i could use {{old()}} and see article info from database (because when i save article, if there are any errors, i want not to loose all post inputs data, so i use {{old()}} there) Sorry, my english is not really good and it's really hard for me to formulate... So my questions sounds: Is it possible to return database data from controller like withInput() and use it with {{old()}}? Thank you! Ask if i said something not understandable.

The answer is yes, the function old() accepts a second parameter, a value if the old value is not defined. In this case, you use the value of the database

Example

{{ old('username', $user->username) }} 

Although the answer below should work, I believe that the best way to solve it is binding the model on your form (use the Form::model, instead of the Form:open).

This way, when you use old('some_field'), it will get the some_field field that the Model refers to.

You can have more information here: https://laravelcollective.com/docs/5.2/html#form-model-binding