2017 © Pedro Peláez
 

library laravel-postgresql-fulltext

Add fulltext and inherited table support to postgresql

image

luozhenyu/laravel-postgresql-fulltext

Add fulltext and inherited table support to postgresql

  • Saturday, March 24, 2018
  • by luozhenyu
  • Repository
  • 1 Watchers
  • 4 Stars
  • 293 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 18 % Grown

The README.md

laravel-postgresql-fulltext

Software License, (*1)

Add fulltext and inherited table support to postgresql, (*2)

Installation

PHP 5.6.4+ and Laravel 5.4+ are required., (*3)

Next step, you must install amutu/zhparser, and make sure it should work., (*4)

Finally, run the following command to install this package via composer, (*5)

composer require "luozhenyu/laravel-postgresql-fulltext"

After install finished, run the following command to generate config file., (*6)

php artisan vendor:publish --provider="LuoZhenyu\PostgresFullText\PostgresqlSchemaServiceProvider"

If you are using laravel 5.4, then you need to register the service provider. Open config/app.php and add the following to the providers array., (*7)

LuoZhenyu\PostgresFullText\PostgresqlSchemaServiceProvider::class

Usage

When using a postgresql database, you can use the method inherits():, (*8)

Schema::create('users', function(Blueprint $table) {
  $table->increments('id');
  $table->string('name');
  $table->integer('age');
});

Schema::create('admins', function(Blueprint $table) {
    $table->string('permission');

    $table->inherits('users');//table admins inherit table users
});

Also you can use the method fulltext() and dropFulltext()., (*9)

Schema::create('articles', function(Blueprint $table) {
  $table->increments('id');
  $table->string('title');
  $table->text('content');

  $table->fulltext(['title', 'content']);

  $table->dropFulltext('articles_title_content_fulltext');
});

And a simple query method is also given in Eloquent ORM using fulltext index., (*10)


use LuoZhenyu\PostgresFullText\FulltextBuilder; ... $fulltext = new FulltextBuilder(['title', 'content']); $articles = Article::where($fulltext->search('any keyword'))->get();

The Versions

24/03 2018

dev-master

9999999-dev

Add fulltext and inherited table support to postgresql

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar luozhenyu

database laravel postgresql inherit fulltext

24/03 2018

1.0.3

1.0.3.0

Add fulltext and inherited table support to postgresql

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar luozhenyu

database laravel postgresql inherit fulltext

22/03 2018

1.0.2

1.0.2.0

Add fulltext and inherited table support to postgresql

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar luozhenyu

database laravel postgresql inherit fulltext

22/03 2018

1.0.1

1.0.1.0

Add fulltext and inherited table support to postgresql

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar luozhenyu

database laravel postgresql inherit fulltext

15/07 2017

1.0.0

1.0.0.0

Add fulltext and inherited table support to postgresql

  Sources   Download

MIT

The Requires

 

The Development Requires

by Avatar luozhenyu

database laravel postgresql inherit fulltext