

- #INSTALLING POSTGRES APP HOW TO#
- #INSTALLING POSTGRES APP INSTALL#
- #INSTALLING POSTGRES APP UPDATE#
- #INSTALLING POSTGRES APP CODE#
Laravel comes with a basic user/password schema for testing and tinkering. In some instances, you may need to link “pgsql.so” to “/usr/lib64/php/modules” and also create a corresponding “/etc/php.d/pdo_pgsql.ini”-it really depends on how your PHP was set up.įinally, test to see if you can communicate with your PostgreSQL database via Laravel: # cd myproject
#INSTALLING POSTGRES APP UPDATE#
Then, edit your “.env” file in the project folder and update the database information accordingly (the values included here are defaults-please adjust to match your configuration): # cat myproject/.env | grep DB
#INSTALLING POSTGRES APP INSTALL#
For Linux users, this can be done with “apt-get install php-pgsql” or “yum install php-pgsql” (you may need to customize these commands based on your distribution and/or version of PHP). That means you need to have php-pgsql installed.
#INSTALLING POSTGRES APP HOW TO#
PHP and Laravel both need to know how to talk to talk to PostgreSQL, so the first step is to make sure that the PostgreSQL drivers for PHP are installed. rwxr-xr-x 1 root root 1686 Nov 21 17:28 artisanĭrwxr-xr-x 3 root root 4096 Nov 21 17:28 bootstrap Once the project has been created and the Laravel framework is pulled, you should be able to see several directories and files in the myproject folder: # ls -lĭrwxr-xr-x 6 root root 4096 Nov 28 19:39 app
#INSTALLING POSTGRES APP CODE#
Note that Laravel is a framework, or a collection of PHP libraries, to assist in development while keeping the code clean. To install Laravel, simply use Composer to create a new project: composer create-project -prefer-dist laravel/laravel myproject Installation of these components is falls outside the scope of this article, but if you need help, you can check out instructions on how to install PHP 7.3 ( RHEL/CentOS, Ubuntu) and PostgreSQL ( RHEL/CentOS, Ubuntu).


PostgreSQL is a powerful database that has been battle-tested in many applications. After walking through the Laravel installation process it shows how to get started and create tables. SUMMARY: This article covers how to use PostgreSQL together with the PHP framework Laravel to deploy web applications.
