Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update installation-setup.md #3750

Merged
merged 1 commit into from
Dec 16, 2024
Merged

Update installation-setup.md #3750

merged 1 commit into from
Dec 16, 2024

Conversation

nastoychev
Copy link
Contributor

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.

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.
@freekmurze freekmurze merged commit a352432 into spatie:main Dec 16, 2024
1 check passed
@freekmurze
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants