Bird
0
0

Given this .env snippet:

medium📝 state output Q13 of 15
Laravel - Database Basics and Migrations
Given this .env snippet:
DB_CONNECTION=pgsql
DB_HOST=127.0.0.1
DB_PORT=5432
DB_DATABASE=mydb
DB_USERNAME=user
DB_PASSWORD=pass

What database type will Laravel connect to?
AMySQL
BPostgreSQL
CSQLite
DSQL Server
Step-by-Step Solution
Solution:
  1. Step 1: Check the DB_CONNECTION value

    The value is 'pgsql', which is the driver name for PostgreSQL in Laravel.
  2. Step 2: Match driver to database type

    'pgsql' corresponds to PostgreSQL, not MySQL, SQLite, or SQL Server.
  3. Final Answer:

    PostgreSQL -> Option B
  4. Quick Check:

    DB_CONNECTION=pgsql means PostgreSQL = A [OK]
Quick Trick: pgsql means PostgreSQL, mysql means MySQL [OK]
Common Mistakes:
  • Confusing pgsql with MySQL
  • Ignoring DB_CONNECTION value
  • Assuming default is MySQL always

Want More Practice?

15+ quiz questions · All difficulty levels · Free

Free Signup - Practice All Questions
More Laravel Quizzes