Problem
You want to see if a file exists.
You know you can use the PHP file_exists() method, but want to do it the Laravel way.
Solution
Use the File::exists() method.
Discussion
This method actually calls file_exists().
But it does allow better testing because using the facade allows you to easily mock the method when needed.
from Linux Hint https://ift.tt/2ErQh3P

0 Comments