Challenge 1: Create Your First Project — Possible Solution ==================================================================== composer create-project laravel/laravel library cd library php artisan serve # INFO Server running on [http://127.0.0.1:8000]. # Visiting that URL in a browser shows Laravel's default welcome page. TOP-LEVEL FOLDERS GENERATED, AND WHAT EACH IS FOR ------------------------------------------------------ - app/ — Application code: Controllers, Models, and other core classes (the equivalent of Django's per-app views.py/models.py, just organized by role instead of by feature). - bootstrap/ — Framework bootstrapping files and a cache directory Laravel uses internally to speed up loading configuration and routes. - config/ — Configuration files split by topic (database.php, app.php, mail.php, etc.), each reading its real values from .env. - database/ — Migrations (schema change history), factories, and seeders for generating test/sample data. - public/ — The actual web server document root; index.php here is the single entry point every request passes through. - resources/ — Blade view templates, plus raw CSS/JS source files before any build step. - routes/ — URL routing definitions — web.php for browser-facing routes, api.php for API routes. - storage/ — Generated files: logs, cached views, file uploads — meant to be writable by the web server, not committed with application data in it. - tests/ — PHPUnit test files (relevant again in Course 2's testing chapter). - vendor/ — Composer-installed dependencies (Laravel itself and every package it depends on) — analogous to Python's site-packages, and, like node_modules, never committed to source control. WHY THIS WORKS -------------- - composer create-project laravel/laravel library both downloads Laravel and every package it depends on (via Composer, PHP's package manager) AND scaffolds a fresh application skeleton in one command — comparable to running pip install django followed by django-admin startproject, just combined into a single step. - php artisan serve starts a simple built-in development server (Laravel's equivalent of python manage.py runserver) — suitable for local development only, not production, the same caveat Django's runserver carries.