Laravel provides the optional() helper function, This function allows us to attempt to access properties or call methods on an object that could be null.
In this article you will learn how to check file request by form submission. Suppose you will upload a file and submit form then if your form submission has file your output will dd the file.