What is Xata?

Connect to Postgres with Laravel

Edit on GitHub

To connect your Laravel application to Xata, you need to adjust the database connection in the .env file as follows:

.env
DB_CONNECTION=pgsql
DB_HOST=<REGION>.sql.xata.sh
DB_PORT=5432
DB_DATABASE=<DATABASE>:<BRANCH>
DB_USERNAME=<WORKSPACE_ID>
DB_PASSWORD=<API_KEY>
DB_SSLMODE=require

Please replace the parameters as indicated on the connect to Postgres page.

#

Known issues