Recall & Review
beginner
What is the purpose of the 'public' disk in Laravel?
The 'public' disk in Laravel is used to store files that should be publicly accessible, like images or documents, typically stored in the
storage/app/public directory and linked to public/storage.Click to reveal answer
beginner
What command creates a symbolic link from
public/storage to storage/app/public in Laravel?The command
php artisan storage:link creates a symbolic link so that files stored in storage/app/public are accessible from the web via public/storage.Click to reveal answer
intermediate
Why do we use symbolic links for the public disk in Laravel?
Symbolic links let Laravel serve files stored outside the public folder securely by linking them inside the public directory, making them accessible via URLs without exposing the whole storage folder.Click to reveal answer
beginner
Where are files stored when using the 'public' disk in Laravel by default?
Files are stored in the
storage/app/public directory by default when using the 'public' disk in Laravel.Click to reveal answer
beginner
What happens if you don't run
php artisan storage:link after storing files on the public disk?If you don't run
php artisan storage:link, files in storage/app/public won't be accessible from the web because the symbolic link public/storage won't exist.Click to reveal answer
What does the
php artisan storage:link command do in Laravel?✗ Incorrect
The command creates a symbolic link so files in
storage/app/public are accessible via public/storage.Where are files stored when using Laravel's 'public' disk by default?
✗ Incorrect
Files are stored in
storage/app/public and accessed via the symbolic link.Why is a symbolic link used for the public disk in Laravel?
✗ Incorrect
Symbolic links provide secure access to files by linking only the public folder.
What happens if you try to access files stored on the public disk without creating the symbolic link?
✗ Incorrect
Without the symbolic link, the web server cannot access files stored outside the public directory.
Which Laravel filesystem disk is typically linked to
public/storage?✗ Incorrect
The 'public' disk is linked to
public/storage via a symbolic link.Explain how Laravel uses the public disk and symbolic links to serve files publicly.
Think about where files are stored and how they become accessible via the web.
You got /4 concepts.
Describe what would happen if the symbolic link for the public disk is missing and how to fix it.
Consider the role of the symbolic link in file accessibility.
You got /4 concepts.