laravel create new file if not exists

Solutions on MaxInterview for laravel create new file if not exists by the best coders in the world

showing results for - "laravel create new file if not exists"
Jonah
24 Mar 2016
1if (!file_exists('somefile.txt')) {
2    touch('somefile.txt', strtotime('-1 days'));
3}