jumper423 / laravel-postgresql-inherit
在postgresql表中添加继承
2.1
2016-06-16 12:33 UTC
Requires
- php: >=5.4.0
- illuminate/database: 5.2.*
- illuminate/support: 5.2.*
Requires (Dev)
- mockery/mockery: ~0.9
- phpunit/phpunit: ~4.0
This package is not auto-updated.
Last update: 2024-09-20 21:22:43 UTC
README
在postgresql表中添加继承
安装
需要PHP 5.4+ 和 Laravel 5.2+。
要获取最新版本的PostgreSQL模式,只需在您的composer.json
文件中要求"jumper423/laravel-postgresql-inherit": "2.*"
。然后您需要运行composer install
或composer update
来下载它并更新自动加载器。
一旦安装了PostgreSQL模式,您需要注册服务提供者。打开app/config/app.php
并将以下内容添加到providers
键。
'ThibaudDauce\PostgresqlSchema\PostgresqlSchemaServiceProvider'
使用方法
当使用postgresql数据库时,在迁移文件中,您可以使用新方法addInheritedTable
<?php Schema::create('test', function(Blueprint $table) { $table->increments('id'); $table->addInheritedTable('users'); });