Browse Source

Use the "Env" helper which has boolean support.

Taylor Otwell 10 years ago
parent
commit
93434d8679
5 changed files with 17 additions and 17 deletions
  1. 2 2
      config/app.php
  2. 1 1
      config/cache.php
  3. 12 12
      config/database.php
  4. 1 1
      config/queue.php
  5. 1 1
      config/session.php

+ 2 - 2
config/app.php

@@ -13,7 +13,7 @@ return [
 	|
 	*/
 
-	'debug' => (bool) getenv('APP_DEBUG') ?: false,
+	'debug' => env('APP_DEBUG'),
 
 	/*
 	|--------------------------------------------------------------------------
@@ -78,7 +78,7 @@ return [
 	|
 	*/
 
-	'key' => getenv('APP_KEY') ?: 'YourSecretKey!!!',
+	'key' => env('APP_KEY') ?: 'YourSecretKey!!!',
 
 	'cipher' => MCRYPT_RIJNDAEL_128,
 

+ 1 - 1
config/cache.php

@@ -15,7 +15,7 @@ return [
 	|
 	*/
 
-	'driver' => getenv('CACHE_DRIVER') ?: 'file',
+	'driver' => env('CACHE_DRIVER') ?: 'file',
 
 	/*
 	|--------------------------------------------------------------------------

+ 12 - 12
config/database.php

@@ -54,10 +54,10 @@ return [
 
 		'mysql' => [
 			'driver'    => 'mysql',
-			'host'      => getenv('DB_HOST') ?: 'localhost',
-			'database'  => getenv('DB_DATABASE') ?: 'forge',
-			'username'  => getenv('DB_USERNAME') ?: 'forge',
-			'password'  => getenv('DB_PASSWORD') ?: '',
+			'host'      => env('DB_HOST') ?: 'localhost',
+			'database'  => env('DB_DATABASE') ?: 'forge',
+			'username'  => env('DB_USERNAME') ?: 'forge',
+			'password'  => env('DB_PASSWORD') ?: '',
 			'charset'   => 'utf8',
 			'collation' => 'utf8_unicode_ci',
 			'prefix'    => '',
@@ -65,10 +65,10 @@ return [
 
 		'pgsql' => [
 			'driver'   => 'pgsql',
-			'host'      => getenv('DB_HOST') ?: 'localhost',
-			'database'  => getenv('DB_DATABASE') ?: 'forge',
-			'username'  => getenv('DB_USERNAME') ?: 'forge',
-			'password'  => getenv('DB_PASSWORD') ?: '',
+			'host'      => env('DB_HOST') ?: 'localhost',
+			'database'  => env('DB_DATABASE') ?: 'forge',
+			'username'  => env('DB_USERNAME') ?: 'forge',
+			'password'  => env('DB_PASSWORD') ?: '',
 			'charset'  => 'utf8',
 			'prefix'   => '',
 			'schema'   => 'public',
@@ -76,10 +76,10 @@ return [
 
 		'sqlsrv' => [
 			'driver'   => 'sqlsrv',
-			'host'      => getenv('DB_HOST') ?: 'localhost',
-			'database'  => getenv('DB_DATABASE') ?: 'forge',
-			'username'  => getenv('DB_USERNAME') ?: 'forge',
-			'password'  => getenv('DB_PASSWORD') ?: '',
+			'host'      => env('DB_HOST') ?: 'localhost',
+			'database'  => env('DB_DATABASE') ?: 'forge',
+			'username'  => env('DB_USERNAME') ?: 'forge',
+			'password'  => env('DB_PASSWORD') ?: '',
 			'prefix'   => '',
 		],
 

+ 1 - 1
config/queue.php

@@ -15,7 +15,7 @@ return [
 	|
 	*/
 
-	'default' => getenv('QUEUE_DRIVER') ?: 'sync',
+	'default' => env('QUEUE_DRIVER') ?: 'sync',
 
 	/*
 	|--------------------------------------------------------------------------

+ 1 - 1
config/session.php

@@ -16,7 +16,7 @@ return [
 	|
 	*/
 
-	'driver' => getenv('SESSION_DRIVER') ?: 'file',
+	'driver' => env('SESSION_DRIVER') ?: 'file',
 
 	/*
 	|--------------------------------------------------------------------------