Getting started with Laravel and Postgres

In this tutorial, we will learn how to set up a Laravel application with a Postgres database provided by Supabase. We will use the Laravel Breeze starter kit for user authentication and connect it to our Supabase database.
To get started, make sure your PHP and Composer versions are up to date and scaffold a new Laravel project using the Laravel documentation.
Next, go to Supabase and create a new project. Save your database password securely. Once your project is set up, navigate to the database settings to find the URI connection string.
Laravel comes with a built-in Postgres adapter, so you can configure it with the environment variables. You can find the database URL in your Supabase Dashboard. You can modify the schema of your Laravel application by updating the database.php file.
Laravel also ships with database migration files for authentication and user management. Run the migrations to set up the required tables by using the command php artisan migrate
. You can now access your application in a browser by navigating to http://127.0.0.1:8000.
In conclusion, Supabase is a reliable choice for powering your Postgres database in Laravel applications.