You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: helpers.md
+13-13Lines changed: 13 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -634,7 +634,7 @@ The `base_path` function returns the fully qualified path to the project root. Y
634
634
<aname="method-config-path"></a>
635
635
#### `config_path()` {#collection-method}
636
636
637
-
The `config_path` function returns the fully qualified path to the `config` directory. You may also use the `config_path` function to generate a fully qualified path to a given file relative to the application's configuration directory:
637
+
The `config_path` function returns the fully qualified path to the `config` directory. You may also use the `config_path` function to generate a fully qualified path to a given file within the application's configuration directory:
638
638
639
639
$path = config_path();
640
640
@@ -643,7 +643,7 @@ The `config_path` function returns the fully qualified path to the `config` dire
643
643
<aname="method-database-path"></a>
644
644
#### `database_path()` {#collection-method}
645
645
646
-
The `database_path` function returns the fully qualified path to the `database` directory. You may also use the `database_path` function to generate a fully qualified path to a given file relative to the database directory:
646
+
The `database_path` function returns the fully qualified path to the `database` directory. You may also use the `database_path` function to generate a fully qualified path to a given file within the database directory:
647
647
648
648
$path = database_path();
649
649
@@ -659,7 +659,7 @@ The `mix` function returns the path to a [versioned Mix file](/docs/{{version}}/
659
659
<aname="method-public-path"></a>
660
660
#### `public_path()` {#collection-method}
661
661
662
-
The `public_path` function returns the fully qualified path to the `public` directory. You may also use the `public_path` function to generate a fully qualified path to a given file relative to the public directory:
662
+
The `public_path` function returns the fully qualified path to the `public` directory. You may also use the `public_path` function to generate a fully qualified path to a given file within the public directory:
663
663
664
664
$path = public_path();
665
665
@@ -668,7 +668,7 @@ The `public_path` function returns the fully qualified path to the `public` dire
668
668
<aname="method-resource-path"></a>
669
669
#### `resource_path()` {#collection-method}
670
670
671
-
The `resource_path` function returns the fully qualified path to the `resources` directory. You may also use the `resource_path` function to generate a fully qualified path to a given file relative to the resources directory:
671
+
The `resource_path` function returns the fully qualified path to the `resources` directory. You may also use the `resource_path` function to generate a fully qualified path to a given file within the resources directory:
672
672
673
673
$path = resource_path();
674
674
@@ -677,7 +677,7 @@ The `resource_path` function returns the fully qualified path to the `resources`
677
677
<aname="method-storage-path"></a>
678
678
#### `storage_path()` {#collection-method}
679
679
680
-
The `storage_path` function returns the fully qualified path to the `storage` directory. You may also use the `storage_path` function to generate a fully qualified path to a given file relative to the storage directory:
680
+
The `storage_path` function returns the fully qualified path to the `storage` directory. You may also use the `storage_path` function to generate a fully qualified path to a given file within the storage directory:
681
681
682
682
$path = storage_path();
683
683
@@ -695,7 +695,7 @@ The `__` function translates the given translation string or translation key usi
695
695
696
696
echo __('messages.welcome');
697
697
698
-
If the specified translation string or key does not exist, the `__` function will simply return the given value. So, using the example above, the `__` function would return `messages.welcome` if the translation key does not exist.
698
+
If the specified translation string or key does not exist, the `__` function will simply return the given value. So, using the example above, the `__` function would return `messages.welcome` if that translation key does not exist.
699
699
700
700
<aname="method-camel-case"></a>
701
701
#### `camel_case()` {#collection-method}
@@ -709,7 +709,7 @@ The `camel_case` function converts the given string to `camelCase`:
709
709
<aname="method-class-basename"></a>
710
710
#### `class_basename()` {#collection-method}
711
711
712
-
The `class_basename`function returns the class name portion of a given fully qualified class name:
712
+
-The `class_basename` returns the class name of the given class with the class' namespace removed:
713
713
714
714
$class = class_basename('Foo\Bar\Baz');
715
715
@@ -1159,7 +1159,7 @@ You may add items to the cache by passing an array of key / value pairs to the f
The `class_uses_recursive()` function returns all traits used by a class, its subclasses and their traits:
1162
+
The `class_uses_recursive()` function returns all traits used by a class, including traits used by any subclasses:
1163
1163
1164
1164
$traits = class_uses_recursive(App\User::class);
1165
1165
@@ -1218,7 +1218,7 @@ If you do not want to halt the execution of your script, use the [`dump`](#metho
1218
1218
<aname="method-decrypt"></a>
1219
1219
#### `decrypt()` {#collection-method}
1220
1220
1221
-
The `decrypt` function decrypts the given value using the [built-in encrypter](/docs/{{version}}/encryption):
1221
+
The `decrypt` function decrypts the given value using Laravel's [encrypter](/docs/{{version}}/encryption):
1222
1222
1223
1223
$decrypted = decrypt($encrypted_value);
1224
1224
@@ -1250,18 +1250,18 @@ If you want to stop executing the script after dumping the variables, use the [`
1250
1250
<aname="method-encrypt"></a>
1251
1251
#### `encrypt()` {#collection-method}
1252
1252
1253
-
The `encrypt` function encrypts the given value using the [built-in encrypter](/docs/{{version}}/encryption):
1253
+
The `encrypt` function encrypts the given value using Laravel's [encrypter](/docs/{{version}}/encryption):
1254
1254
1255
1255
$encrypted = encrypt($unencrypted_value);
1256
1256
1257
1257
<aname="method-env"></a>
1258
1258
#### `env()` {#collection-method}
1259
1259
1260
-
The `env` function retrieves the value of an [environment](/docs/{{version}}/configuration#environment-configuration) variable or returns a default value:
1260
+
The `env` function retrieves the value of an [environment variable](/docs/{{version}}/configuration#environment-configuration) or returns a default value:
1261
1261
1262
1262
$env = env('APP_ENV');
1263
1263
1264
-
// Will return 'production' if APP_ENV is not set
1264
+
// Returns 'production' if APP_ENV is not set...
1265
1265
$env = env('APP_ENV', 'production');
1266
1266
1267
1267
<aname="method-event"></a>
@@ -1509,7 +1509,7 @@ The `throw_unless` function throws the given exception if a given boolean expres
0 commit comments