Skip to content

Commit

Permalink
Update installation-setup.md (#3750)
Browse files Browse the repository at this point in the history
We add the two values, **`visibility`** and **`throw`**, in Laravel's filesystem configuration for the following reasons:

1. **`visibility` => 'public'**:  
   Ensures that files and directories created are accessible to the web server (e.g., Nginx). Files will have permissions like **`644`** and directories **`755`**, making them readable by others while maintaining write permissions for the application.

2. **`throw` => false**:  
   Prevents Laravel from throwing exceptions when a filesystem operation (like file upload or deletion) fails. Instead, Laravel will silently fail, allowing you to handle errors gracefully without crashing the application.

These settings help ensure compatibility between containers (Nginx and PHP-FPM) and avoid permission-related issues during file access.
  • Loading branch information
nastoychev authored Dec 16, 2024
1 parent ca56824 commit a352432
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/installation-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,8 @@ By default, the media library will store its files on Laravel's `public` disk. I
'driver' => 'local',
'root' => public_path('media'),
'url' => env('APP_URL').'/media',
'visibility' => 'public',
'throw' => false,
],
...
```
Expand Down

0 comments on commit a352432

Please sign in to comment.