Download the PHP package elimuswift/db-exporter without Composer

On this page you can find all versions of the php package elimuswift/db-exporter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package db-exporter

Scrutinizer Code Quality Latest Stable Version Total Downloads Latest Unstable Version License

Database Exporter

Export your database quickly and easily as a Laravel Migration and all the data as a Seeder class. This can be done via artisan commands or a controller action.

Please note that I've only tested this package on a MySQL database. It has been confirmed it does not work with Postgres

Installation

Add "elimuswift/db-exporter"* as a requirement to composer.json:

Update composer:

For laravel <=5.4, Add the service provider to config/app.php:

(Optional) Publish the configuration file.

After publishing the config file make sure you change storage location for migrations and seeds.

Use dev-master as version requirement to be on the cutting edge

Documentation

From the commandline

Export database to migration

Basic usage

Specify a database

Ignoring tables

You can ignore multiple tables by seperating them with a comma.

Export database table data to seed class

This command will export all your database table data into a seed class.

Important: This requires your database config file to be updated in config/database.php**

Uploading migrations/seeds to Storage Disk

Important: The package backup destinations paths should match your desired disk location

You can backup migrations and / or seeds to a storage disk that you application supports.

Or upload the seeds to the production server:

Or even combine the two:

This feature uses Laravel's filesystem.

You must configure your storage and then specify the disk name in the config file. The default disk is local

Export current database

This class will export the database name from your config/database.php file, based on your 'default' option.

Export a custom database

Database to seed

This will write a seeder class with all the data of the current database.

Seed a custom database

Just pass the nameof the database to be seeded.

Next all you have to do is add the call method on the base seed class:

Now you can run from the commmand line:

php artisan db:seed, or, without having to add the call method: php artisan db:seed --class=nameOfYourSeedClass

Chaining

You can also combine the generation of the migrations & the seed:

Or with:

Ignoring tables

By default the migrations table is ignored. You can add tabled to ignore with the following syntax:

You can also pass an array of tables to ignore.

From the configuration file

Ignore tables for seeder

If you want to always ignore certain tables you can do it on the config file

With this configuration every time when the command php artisan db-exporter:seeds is executed will ignore the tables on the array

Just use selected tables for seeder

In the other hand, If you want to use always certain tables you can do it on the config file

With this configuration every time when the command php artisan db-exporter:seeds is executed will only be executed to the tables on the array

Credits

Credits to @nWidart the original creator of the package DbExporter. I couldn't get it working as-is, so I decided to rewrite the package to fit the latest versions of laravel, and added a couple a features of my own.


All versions of db-exporter with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.9
illuminate/support Version ^5.2
illuminate/database Version ^5.2
illuminate/filesystem Version ^5.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package elimuswift/db-exporter contains the following files

Loading the files please wait ....