Skip to content

Commit 001b19a

Browse files
authored
docs: tweak wording
1 parent c69c1ec commit 001b19a

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

Diff for: view.md

+8-7
Original file line numberDiff line numberDiff line change
@@ -24,30 +24,31 @@ View::make('view.name', ['foo' => 'bar']);
2424
view('view-name', ['foo' => 'bar']);
2525
```
2626

27+
<a name="views-in-production"></a>
2728
## Using views in production
2829

29-
In order to use blade view in production, a `view.php` file must be added in `config` directory to specify the path where the compiled view should be stored.
30+
In order to use Blade views in production, a `view.php` file must be added in the `config` directory to specify the path where the compiled views should be stored.
3031

3132
For example:
3233
```php
3334
<?php
35+
3436
return [
3537
'paths' => [
3638
resource_path('views'),
3739
],
3840
'compiled' => \Phar::running()
3941
? getcwd()
4042
: env('VIEW_COMPILED_PATH', realpath(storage_path('framework/views'))),
41-
]
43+
];
4244
```
45+
46+
An alternative to using the current working directory is to use the system temporary directory with `sys_get_temp_dir()`, but any path can be specified, such as a custom location in the user's home directory.
4347

44-
You also need to add the `resources` directory in the `box.json` file to include it in the PHAR file will be compiled:
48+
The `resources` directory must also be added to the `box.json` file to include it in the compiled PHAR file:
4549
```json
4650
"directories": [
47-
"app",
48-
"bootstrap",
49-
"config",
50-
"vendor",
51+
// ...
5152
"resources"
5253
],
5354
```

0 commit comments

Comments
 (0)