Download the PHP package ronnievisser/laravel-postgres-ext without Composer

On this page you can find all versions of the php package ronnievisser/laravel-postgres-ext. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-postgres-ext

Laravel 5.4 extended PostgreSQL driver

This is a clone from yurykabanov/laravel-postgres-ext and has Laravel 5.4 support.

This project was inspired by features PostgreSQL supports and Laravel does not. Unfortunately, such features are not accepted in official repository (like this one) and developers are told to use raw queries that is completely wrong solution in my opinion.

Requirements

  1. PHP >= 5.6 or HHVM
  2. PostgreSQL. Obviously it has to support particular feature you want to use. For example, to use views it has to be at least 9.1, to use upsert it has to be at least 9.5 (current stable).

Installation

  1. Run composer require ronnievisser/laravel-postgres-ext to install this package.
  2. Change database service provider from original Illuminate\Database\DatabaseServiceProvider::class to RonnieVisser\Database\DatabaseServiceProvider::class.
  3. Models should extend RonnieVisser\Database\Eloquent\Model instead of Illuminate\Database\Eloquent\Model.

Features available

UPSERT

UPSERT (INSERT ON CONFLICT UPDATE) is supported by PostgreSQL since version 9.5 and can be performed by calling

Like original insert method, upsert can manage multiple records.

Various index types

PostgreSQL supports several index types: btree, hash, gist, spgist, gin, and brin (as for version 9.5) and other index-related features (for example, index can be created concurrently, i.e. without table locking). This package supports creation of all currently supported indexing methods.

Indexes can be created using the same syntax as original one:

but it now accepts additional parameters:

where $methodName is one of methods listed before and $arrayOfOptions is array with different options (like concurrency and uniqueness).

Examples:

Note, that there's two ways of making column unique: using constraint and index (more information). Laravel uses constraint to make column unique, this behavior stays the same for $table->unique() but you can also create unique index using $table->index($col, $index, $method, [ 'unique' => true ]).

Views

PostgreSQL supports views (since version 9.1) and materialized views (since version 9.3). These can be created using DB::statement() but it's more convenient to use some aliases to manage them.

Views can be created using following statements:

and dropped:

So far it doesn't support some query builders since view's select statement could be (and usually is) very complicated.

Jsonb operators

Laravel claims that it does support jsonb type and jsonb operators like ?, ?| and ?&. But it is impossible to use them in queries since they are treated as parameters in prepared statements. This package automatically wraps these operators in appropriate functions (Note that ?| also used for other types -- this behavior is not supported at this moment).

Group by grouping sets, rollup, cube

Available group by expressions described in official documentation.


All versions of laravel-postgres-ext with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
laravel/framework Version ^5.4
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package ronnievisser/laravel-postgres-ext contains the following files

Loading the files please wait ....