0
0
Laravelframework~10 mins

Filesystem configuration in Laravel - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set the default filesystem disk in Laravel's config.

Laravel
'default' => env('FILESYSTEM_DRIVER', '[1]'),
Drag options to blanks, or click blank then click option'
Alocal
Bpublic
Cs3
Dftp
Attempts:
3 left
💡 Hint
Common Mistakes
Choosing 'public' instead of 'local' as default disk.
Using cloud disks like 's3' without proper setup.
2fill in blank
medium

Complete the code to define a disk driver in Laravel's filesystem config.

Laravel
'disks' => [
    'local' => [
        'driver' => '[1]',
        'root' => storage_path('app'),
    ],
],
Drag options to blanks, or click blank then click option'
Alocal
Bs3
Cftp
Dpublic
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'ftp' or 's3' drivers for local disk configuration.
Confusing 'public' with 'local' driver.
3fill in blank
hard

Fix the error in the disk configuration to correctly set the visibility.

Laravel
'public' => [
    'driver' => 'local',
    'root' => storage_path('app/public'),
    'visibility' => '[1]',
],
Drag options to blanks, or click blank then click option'
Aprotected
Bprivate
Cpublic
Dhidden
Attempts:
3 left
💡 Hint
Common Mistakes
Setting visibility to 'private' or 'hidden' for public disk.
Using invalid visibility values.
4fill in blank
hard

Fill both blanks to configure an S3 disk with correct driver and region.

Laravel
's3' => [
    'driver' => '[1]',
    'region' => '[2]',
    'bucket' => env('AWS_BUCKET'),
],
Drag options to blanks, or click blank then click option'
As3
Blocal
Cus-east-1
Deu-west-1
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'local' as driver for S3 disk.
Setting region to an invalid value.
5fill in blank
hard

Fill all three blanks to create a custom FTP disk configuration.

Laravel
'ftp_custom' => [
    'driver' => '[1]',
    'host' => env('FTP_HOST'),
    'username' => env('FTP_USERNAME'),
    'password' => env('FTP_PASSWORD'),
    'port' => [2],
    'root' => '[3]',
],
Drag options to blanks, or click blank then click option'
Aftp
B21
C/path/to/root
Ds3
Attempts:
3 left
💡 Hint
Common Mistakes
Using 's3' as driver for FTP disk.
Setting port to a string instead of a number.
Leaving root path empty or incorrect.