Bird
0
0

You want to install Laravel but only want the minimal dependencies to speed up installation. Which Composer option helps achieve this?

hard📝 Application Q9 of 15
Laravel - Basics and Architecture
You want to install Laravel but only want the minimal dependencies to speed up installation. Which Composer option helps achieve this?
Acomposer create-project laravel/laravel myapp --no-dev
Bcomposer create-project laravel/laravel myapp --no-scripts
Ccomposer create-project laravel/laravel myapp --prefer-dist
Dcomposer create-project laravel/laravel myapp --no-autoloader
Step-by-Step Solution
Solution:
  1. Step 1: Understand Composer options for dependencies

    The --no-dev option skips installing development packages.
  2. Step 2: Apply to Laravel installation

    Using --no-dev installs only production dependencies, speeding up install.
  3. Final Answer:

    composer create-project laravel/laravel myapp --no-dev -> Option A
  4. Quick Check:

    Skip dev dependencies with --no-dev option [OK]
Quick Trick: Use --no-dev to skip development packages during install [OK]
Common Mistakes:
  • Using --no-scripts which disables scripts but not dev packages
  • Using --prefer-dist which affects package source, not dev dependencies
  • Using --no-autoloader which breaks autoloading

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Laravel Quizzes