2017 © Pedro Peláez
 

library laravel-database-structure

Package that generates a php file with the tables and fields of the database after running all the migrations

image

nachofassini/laravel-database-structure

Package that generates a php file with the tables and fields of the database after running all the migrations

  • Thursday, May 17, 2018
  • by nachofassini
  • Repository
  • 1 Watchers
  • 1 Stars
  • 441 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 611 % Grown

The README.md

Package that generates a schema file

Install

You can pull in the package via composer: ``` bash composer require nachofassini/laravel-database-structure, (*1)


For laravel < 5.6: the service provider must be registered: ```php // config/app.php 'providers' => [ ... NachoFassini\LaravelDatabaseStructure\ServiceProvider::class, ];

How to generate schema file

To generate schema file just type in the console:, (*2)

``` bash php artisan schema:file, (*3)


The file should be generated at your database path like ```schema.php``` and would look like these: ``` php $tables => [ 'users' => [ 'id', 'name', 'email', 'created_at', ... ], 'posts' => [ 'user_id', 'title', ... ] ];

There are no conventions about this, but I think this file should be ignored., (*4)

Automatic update on migrations

If you want the file to be updated every time you change the database through any migrate command, just set AUTOMATIC_SCHEMA_FILE=true in your .env file., (*5)

This will make that after executing any kind of migration command, the schema file gets up to date with the final database structure., (*6)

Contributing

I think this can be much more useful, any collaboration is appreciated., (*7)

License

The MIT License (MIT). Please see License File for more information., (*8)

The Versions

17/05 2018

dev-master

9999999-dev

Package that generates a php file with the tables and fields of the database after running all the migrations

  Sources   Download

MIT

The Requires

 

by Ignacio Fassini

database laravel schema structure schema-file

17/05 2018

2.0.0

2.0.0.0

Package that generates a php file with the tables and fields of the database after running all the migrations

  Sources   Download

MIT

The Requires

 

by Ignacio Fassini

database laravel schema structure schema-file

17/05 2018

dev-develop

dev-develop

Package that generates a php file with the tables and fields of the database after running all the migrations

  Sources   Download

MIT

The Requires

 

by Ignacio Fassini

database laravel schema structure schema-file

27/07 2017

v1.0.0

1.0.0.0

Package that generates a php file with the tables and fields of the database after running all the migrations

  Sources   Download

MIT

The Requires

 

by Ignacio Fassini