Bird
0
0

What will be the output of running php artisan key:generate --show?

medium📝 Predict Output Q4 of 15
Laravel - Configuration and Environment
What will be the output of running php artisan key:generate --show?
AThrows an error because --show is not a valid option
BGenerates a new key and updates the .env file silently
CShows the current key stored in config/app.php
DDisplays the new application key without modifying any files
Step-by-Step Solution
Solution:
  1. Step 1: Understand the --show option

    The --show flag outputs the generated key to the console without changing files.
  2. Step 2: Differentiate from default behavior

    Without --show, the command updates the .env file; with --show, it only displays the key.
  3. Final Answer:

    Displays the new application key without modifying any files -> Option D
  4. Quick Check:

    --show option = display key only [OK]
Quick Trick: Use --show to print key without file changes [OK]
Common Mistakes:
  • Assuming it updates .env with --show
  • Thinking it shows config/app.php key
  • Believing --show is invalid

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Laravel Quizzes