php make a file check code example
Example: laravel create new file if not exists
if (!file_exists('somefile.txt')) {
touch('somefile.txt', strtotime('-1 days'));
}
if (!file_exists('somefile.txt')) {
touch('somefile.txt', strtotime('-1 days'));
}