Using PostgreSQL With Laravel
By default Laravel ships with MySQL. You may want to try out other SQL database type, changing that is very simple however there are some small configurations you have to make if your database of choice is postgres.
Download PostgreSQL to your pc from https://www.postgresql.org/download/
Or directly here (for windows) https://get.enterprisedb.com/postgresql/postgresql-12.1-3-windows-x64.exe
MySQL is the default therefore there’s need to activate PostgreSQL for use with PHP on your pc by editing the php.ini
Search for these two lines within your php.ini and remove the “;” in front of each:
to (notice that “;” was removed)
Change the following as appropriate within the Laravel’s .env file (all the defaults are ok except
DB_PASSWORD that you may have to change):
Create your migration files as usual and run migration.
ORM (Object-relational mapping) handles the underlining differences between different SQL databases (sqlite, MySQL, postgres), there is no need for any extra work as your migration command run successfully.
Hope this helps.