0
0
Laravelframework~10 mins

Application key generation 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 generate a new application key using Artisan.

Laravel
php artisan [1]
Drag options to blanks, or click blank then click option'
Agenerate:key
Bmake:key
Capp:key
Dkey:generate
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'make:key' instead of 'key:generate'.
Swapping the order of words in the command.
2fill in blank
medium

Complete the code to set the application key in the .env file after generating it.

Laravel
APP_KEY=[1]
Drag options to blanks, or click blank then click option'
Akey:generate
Bbase64:randomstring
Crandomstring
Dbase64:key
Attempts:
3 left
💡 Hint
Common Mistakes
Setting the key without 'base64:' prefix.
Using the command name instead of the key value.
3fill in blank
hard

Fix the error in the code to correctly generate and set the application key.

Laravel
php artisan [1] --show
Drag options to blanks, or click blank then click option'
Akey:generate
Bkey:make
Capp:key
Dgenerate:key
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'key:make' which is not a valid command.
Swapping the command words.
4fill in blank
hard

Fill both blanks to generate a new key and force overwrite the existing key.

Laravel
php artisan [1] [2]
Drag options to blanks, or click blank then click option'
Akey:generate
B--force
C--show
D--quiet
Attempts:
3 left
💡 Hint
Common Mistakes
Using '--show' instead of '--force'.
Omitting the force option when overwriting.
5fill in blank
hard

Fill all three blanks to generate a new key, force overwrite, and display the key without writing to .env.

Laravel
php artisan [1] [2] [3]
Drag options to blanks, or click blank then click option'
Akey:generate
B--force
C--show
D--quiet
Attempts:
3 left
💡 Hint
Common Mistakes
Using '--quiet' instead of '--show'.
Not including '--force' when overwriting.