php if file exist also create 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'));
}