PHP code example of simo46 / laravel-postgresql-inherit
1. Go to this page and download the library: Download simo46/laravel-postgresql-inherit library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
simo46 / laravel-postgresql-inherit example snippets
RishiRamawat\PostgresSchema\PostgresqlSchemaServiceProvider::class,
Schema::create('cities', function(Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->double('population');
$table->integer('altitude')->comment('In Feet');
});
Schema::create('capitals', function(Blueprint $table) {
$table->string('state');
// Make capitals table inherits all the columns of its parent table, cities
$table->inherits('cities');
});