Connect Laravel to SQLEye
Set the DB_* variables in your .env file. The instance’s Info tab has a “Laravel .env” block you can copy.
How do I configure PostgreSQL?
Section titled “How do I configure PostgreSQL?”DB_CONNECTION=pgsqlDB_HOST=127.0.0.1DB_PORT=5432DB_DATABASE=myappDB_USERNAME=postgresDB_PASSWORD=How do I configure MySQL?
Section titled “How do I configure MySQL?”DB_CONNECTION=mysqlDB_HOST=127.0.0.1DB_PORT=3306DB_DATABASE=myappDB_USERNAME=rootDB_PASSWORD=Replace the port with your instance’s port. Create the database first, see CLI clients. Then run php artisan migrate.
Laravel’s config/database.php reads these variables, and it also accepts a single DB_URL such as mysql://root@127.0.0.1:3306/myapp instead of separate values (its documented form is driver://username:password@host:port/database).
Check the config
Section titled “Check the config”php artisan db:showSource: Laravel database docs. To see the queries Laravel runs, including N+1 loops, turn on capture.
SQLEye is developed and maintained by CodeROG. This page is also available as Markdown.