2017 © Pedro Peláez
 

library schema-info

Analyze and navigate a databases' structure using a simple fluent api

image

shadetheartist/schema-info

Analyze and navigate a databases' structure using a simple fluent api

  • Saturday, April 8, 2017
  • by Shadetheartist
  • Repository
  • 1 Watchers
  • 0 Stars
  • 59 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 10 Versions
  • 0 % Grown

The README.md

shadetheartist/schema-info

A utility class intended to help interface with a databases' schema information in an efficient manner., (*1)

Setting Up

Firstly add the schema-info dependency to your projects composer file, (*2)

composer.json, (*3)

"require": {
    ...,
    "shadetheartist/schema-info": "1.5.3"
}

In your terminal run composer dump-autoload., (*4)


Secondly add the SchemaInfo service provider and facade to your projects' bootstrapping procedure via, (*5)

config/app.php, (*6)

'providers' => [
    ...,
    SchemaInfo\SchemaInfoServiceProvider::class,
]

And you're set!, (*7)

Examples

General Usage

Creating a New Schema Instance

<?php namespace App;

use SchemaInfo\Facades\SchemaInfo;

class Example
{
    public function example()
    {
        $schema = SchemaInfo::make();
    }

    public function exampleAltConnection()
    {
        //connect to a different database. note: only mysql databases are currently supported.
        $schema = SchemaInfo::make(\DB::connection('my-alternative-connection'));
    }
}

Table Usage

$table = $schema->table('my_table_name');

//returns a stdClass instance refecting a record from the schema info of your database.
$info = $table->info();

Retrieving a Column

$table = $schema->table('my_table_name');

$column = $table->column('my_column_name');

$allColumns = $table->columns();

Column Usage

$column = $table->column('my_column_name');

//returns a stdClass instance refecting a record from the schema info of your database.
$column->info();

//get the table the column belongs to.
$parentTable = $column->table();

The Versions

08/04 2017

dev-master

9999999-dev

Analyze and navigate a databases' structure using a simple fluent api

  Sources   Download

MIT

The Requires

 

by Derek Hemingson

database schema mysql analysis info

08/04 2017

1.6.0

1.6.0.0

Analyze and navigate a databases' structure using a simple fluent api

  Sources   Download

MIT

The Requires

 

by Derek Hemingson

database schema mysql analysis info

29/03 2017

1.5.3

1.5.3.0

Analyze and navigate a databases' structure using a simple fluent api

  Sources   Download

MIT

The Requires

 

by Derek Hemingson

database schema mysql analysis info

24/03 2017

1.4.1

1.4.1.0

Analyze and navigate a databases' structure using a simple fluent api

  Sources   Download

MIT

The Requires

 

by Derek Hemingson

database schema mysql analysis info

26/02 2017

1.3.2

1.3.2.0

Analyze and navigate a databases' structure using a simple fluent api

  Sources   Download

MIT

The Requires

 

by Derek Hemingson

database schema mysql analysis info

26/02 2017

1.3.1

1.3.1.0

Analyze and navigate a databases' structure using a simple fluent api

  Sources   Download

MIT

The Requires

 

by Derek Hemingson

database schema mysql analysis info

26/02 2017

1.3.0

1.3.0.0

Analyze and navigate a databases' structure using a simple fluent api

  Sources   Download

MIT

The Requires

 

by Derek Hemingson

database schema mysql analysis info

20/02 2017

1.2.0

1.2.0.0

Analyze and navigate a databases' structure using a simple fluent api

  Sources   Download

MIT

The Requires

 

by Derek Hemingson

database schema mysql analysis info

20/02 2017

1.1.0

1.1.0.0

Analyze and navigate a databases' structure using a simple fluent api

  Sources   Download

MIT

The Requires

 

by Derek Hemingson

database schema analysis info

16/02 2017

1.0.0

1.0.0.0

Analyze and navigate a databases' structure using a simple fluent api

  Sources   Download

MIT

The Requires

 

by Derek Hemingson

database schema analysis info