Download the PHP package nobodyiscertain/laravel-db-commands without Composer

On this page you can find all versions of the php package nobodyiscertain/laravel-db-commands. 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 laravel-db-commands

Laravel DB Commands

Here are few Artisan commands to help with common database tasks. This package currently handles:

Note: Currently, this package only supports MySQL. Should you have a need for a different database driver, please open an issue or feel free to fork and pull request away.

Installation

Install with Composer:

Add service provider to config/app.php:

On the command line, run:

This will publish the config file laravel-db-commands.php to your config directory. You will need to configure that to match your setup and you should be good to go! Details on the configuration for each of the commands can be found below.

Pulling the Database

This command makes it a snap to pull a database dump from a specific environment. After you have it configured, a simple php artisan db:pull production will pull the production database and import it locally.

How to Run

db_connection_name: Pass in the name of the connection used in your config/database.php that you'd like to pull.

Configuration

dbpull_auto_import: If you would like the database to be auto imported locally after it's pulled, set this to true, otherwise, false.

dbpull_local_db_conn: Set this to the name of your local db connection you'd like the dump imported to.

dbpull_dump_destination: Set this to a local path you'd like the dump to be stored. I generally use /tmp so it'll get wiped.

Preparing the Test Database

This command saves the hassle of typing the lengthy artisan command to refresh the testing database and, optionally, run the seeds. Inspried by a similar command in Rails.

How to Run

Configuration

testing_db_connection: Set this to the name of the testing database connection configured in config/database.php.

testing_run_seeds: If you'd like to run the seeds after the database is refreshed, set this to true, otherwise, false.

Backing up the Database

This command will pull a database dump and upload it to a configured filesystem location. It's great for making one off backups or scheduling with Artisan to make automated backups a breeze.

How to Run

Configuration

backup_db_conn: This is the name of database connection in config/database.php you'd like to backup. Keep in mind the context of where this command will run. If it's going to be run on the a prodcution server, then most likely it'll be your default mysql connection.

backup_dump_destination: A local filepath to store the database dump. If on a UNIX-based system, /tmp works great.

backup_disk: This is the disk name from config/filesystems.php that you'd like to permanently store the database dump.

If you'd like to setup automated backups, drop in something like this into app/Console/Kernal.php.


All versions of laravel-db-commands with dependencies

PHP Build Version
Package Version
Requires illuminate/support Version ~5.1
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 nobodyiscertain/laravel-db-commands contains the following files

Loading the files please wait ....