laravel create new file if not exists
snippet in php

laravel create new file if not exists

user5821

if (!file_exists('somefile.txt')) {
    touch('somefile.txt', strtotime('-1 days'));
}