Download the PHP package taylornetwork/backup-importer without Composer

On this page you can find all versions of the php package taylornetwork/backup-importer. 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 backup-importer

Backup Importer

This package will allow you to import data to your database from a backup database that is not identical.

This is useful if you re-write an application and the database structure changes.

Install

Using Composer

Publish Config

Add Backup Database Config

By default this will use your mysql database connection with the DB_BACKUP_DATABASE value from your .env file or backup as the database name

Add connection details to config/backup-importer.php

Usage

Run your importers

Create an Importer

Would generate an importer App\Backup\Importers\CustomerImporter.php by default.

Simple Importer

By default the importer assumes the following

Advanced Importers

You can override the above assumptions on an importer by importer basis

Override Model

Add a protected $model variable in your importer

Override the Backup Table Name

Add a protected $backupTableName variable in your importer

Ignore Model (For a Pivot Table)

If you don't have a model for this importer set a protected $ignoreModel to true

Override Columns From Backup Table

You can override the columns that are taken from the backup table, or rename them.

Add a public getColumnMap() function that returns the array of columns to get.

Example

Customizing the import() function

The import() function by default will return $this->simpleImport() which is fine for simple tables with no relations, however you will likely want to customize the import logic.

Notes

Example

Let's say you have an application that has customers and services. Each customer can have many services with properties. You have the following models which you store in app/

For the customer and service models, you used the simple import method.


All versions of backup-importer with dependencies

PHP Build Version
Package Version
Requires illuminate/support Version 5.*.*
illuminate/database Version 5.*.*
illuminate/console Version 5.*.*
php Version >=7.1.0
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 taylornetwork/backup-importer contains the following files

Loading the files please wait ....