Bird
0
0

In a Laravel project, where should you place custom Artisan commands?

easy📝 Conceptual Q2 of 15
Laravel - Basics and Architecture
In a Laravel project, where should you place custom Artisan commands?
Aresources/lang
Bapp/Console/Commands
Croutes/web.php
Dstorage/logs
Step-by-Step Solution
Solution:
  1. Step 1: Locate Artisan command files

    Custom Artisan commands are stored in app/Console/Commands to keep command logic organized.
  2. Step 2: Understand other folders' purposes

    routes/web.php defines routes, resources/lang holds language files, and storage/logs stores log files.
  3. Final Answer:

    app/Console/Commands -> Option B
  4. Quick Check:

    Artisan commands folder = app/Console/Commands [OK]
Quick Trick: Custom commands go in app/Console/Commands [OK]
Common Mistakes:
  • Placing commands in routes folder
  • Confusing language files with commands
  • Storing commands in storage folder

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Laravel Quizzes