From f42ac0c5bacfb861cef6427d5a35d59b0dfba59d Mon Sep 17 00:00:00 2001 From: KodeStar Date: Fri, 4 Jan 2019 10:38:07 +0000 Subject: [PATCH] if .env is missing copy example and generate key --- app/Providers/AppServiceProvider.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Providers/AppServiceProvider.php b/app/Providers/AppServiceProvider.php index 28ad5c27..072fa3f7 100644 --- a/app/Providers/AppServiceProvider.php +++ b/app/Providers/AppServiceProvider.php @@ -21,7 +21,7 @@ class AppServiceProvider extends ServiceProvider { if(!is_file(base_path('.env'))) { - touch(base_path('.env')); + copy(base_path('.env.example'), base_path('.env')); Artisan::call('key:generate'); } if(!is_file(database_path('app.sqlite'))) {