Laragon setup series Part 5 “add sqlite and postgres to Laragon”.
In Laravel development the database is a layer that can be handle with an abstract implementation like Eloquent so we do not care to much about the drivers or sql setences by itself, but for development purpose sometimes it is preferred to use a lightway database like sqlite (useful in case of tests in memory a very cool feature that is added by default in Laravel 6)
Or postgres because it would be the production database, in this cases you will need to add more drivers to the default Laragon mysql driver, this is really easy, and it will be divided in two steps for each one.
Step One download the extension
Go to menu/php/extensions/pdo_sqlite or menu/php/extensions/pdo_pgsql according to the case.
Step Two install a tool to manage sqlite or postgres dbs
Go to menu/tools/quick add/postgresql-11 and click on this option:
Then it will download and extract the software:
When it finish the process, go to config (the cog icon) /Services & Ports, now you will have available PostgreSQL checkbox, click the checkbox and close:
Now when Laragon loads it will start the postgreSQL engine too, go to Menu/PostgreSQL (this is a new option) /pgAdmin4 and click it:
It will load the software to manage postgreSQL databases easily, now to open:
pgAdmin requires to set a server to manage development database:
to add a server go to sidebar, select servers/create/server option, click this option:
Add a name for the server and Add a connection Host as localhost and save
Now you have your development server configured, just need to add a database, to add a database click on your “development” server, it will expand options, click on Database option and then select create/database and now you will have the setup for postgreSQL complete.
For SQLite
Sqlite is commonly used by development purpose only so, its better to use tinker to view/manage SQLite databases reference of tinker here
Thanks for reading, the next and last part of this series will cover the setup tools for frontend technologies like node and yarn, if you find this post helpful please clap and share.