0
0
Laravelframework~5 mins

Filesystem configuration in Laravel - Cheat Sheet & Quick Revision

Choose your learning style9 modes available
Recall & Review
beginner
What is the purpose of the config/filesystems.php file in Laravel?
It defines how Laravel interacts with different storage systems, like local disks, cloud storage, and FTP servers. It sets up 'disks' that Laravel can use to save and retrieve files.
Click to reveal answer
beginner
What is a 'disk' in Laravel's filesystem configuration?
A 'disk' is a named storage location defined in config/filesystems.php. It can point to local folders, cloud services like Amazon S3, or other storage types.
Click to reveal answer
beginner
How do you set the default filesystem disk in Laravel?
You set the default key in config/filesystems.php to the name of the disk you want Laravel to use by default, like 'local' or 's3'.
Click to reveal answer
intermediate
What environment variable is commonly used to configure the default filesystem disk?
The FILESYSTEM_DISK environment variable is used to set the default disk dynamically without changing code.
Click to reveal answer
beginner
Name two common drivers used in Laravel filesystem disks and what they represent.
1. local driver: stores files on the server's local disk.<br>2. s3 driver: stores files on Amazon S3 cloud storage.
Click to reveal answer
Where do you define storage disks in Laravel?
AIn <code>config/filesystems.php</code>
BIn <code>routes/web.php</code>
CIn <code>app/Http/Controllers</code>
DIn <code>resources/views</code>
Which environment variable sets the default filesystem disk?
AAPP_ENV
BCACHE_DRIVER
CFILESYSTEM_DISK
DDB_CONNECTION
What driver would you use to store files on Amazon S3?
Adatabase
Bftp
Clocal
Ds3
If you want to store files on your server's hard drive, which driver should you choose?
Arackspace
Blocal
Cs3
Dftp
How can you add a new storage location in Laravel?
AAdd a new disk entry in <code>config/filesystems.php</code>
BCreate a new route in <code>routes/web.php</code>
CAdd a new controller method
DModify the <code>app/Models/User.php</code> file
Explain how Laravel uses the filesystem configuration to manage file storage.
Think about how Laravel knows where and how to save files.
You got /4 concepts.
    Describe the steps to add a new cloud storage disk in Laravel.
    Focus on configuration and environment setup.
    You got /4 concepts.