Download the PHP package envor/laravel-database-manager without Composer

On this page you can find all versions of the php package envor/laravel-database-manager. 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-database-manager

Abondoned! Use https://github.com/envor/laravel-schema-macros instead

A small library for managing databases

Create and delete mysql and sqlite databases. Soft deletes, or "recycles" databases by default. Also it can clean up old recycled databases.

Installation

You can install the package via composer:

[!WARNING]
If you are using laravel 10, you will have to manually install doctrine/dbal
doctrine/dbal is not a requirement for Laravel 11

You can publish the config file with:

This is the contents of the published config file:

Usage

Faking

This package tests things like creating and deleting physical databases so that you don't have to. You simply call DatabaseManager::fake() then test your application's feature logic (validation, etc)

SQLite

Creates an sqlite database at storage/app/my-new-database.sqlite

Soft deletes the database and moves it to storage/app/.trash/2023/03/02/07_04_38_my-new-database.sqlite:

The package appends the .sqlite file extension on its own, and expects managed sqlite database files to have the extension

Erases the database permanently from disk:

Erases all the database files in the .trash folder with mtime more than one day old:

MYSQL

Sets the connection then creates a new database.

[!NOTE] The sqlite driver to doesn't need a connection because it uses the Illuminate\Support\Storage helper under the hood.

Soft deletes the database and moves it to deleted_2023_3_2_7_04_38_my_new_database

No mtime for mysql, simply compares $daysOld against the formated time segment in the deleted name 2023_3_2_7_04_38_. This is done by using Carbon::createFromFormat('Y_m_H_h_i_s_').

Creating Managers

Out of the box this package includes managers for sqlite and mysql. You can create your own managers and add them to the managers array in the database-manager config. Feel free to submit a PR for any additional custom managers that use standard laravel drivers, such as postgres.

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

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


All versions of laravel-database-manager with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
illuminate/contracts Version ^10.0|^11.0
illuminate/support Version ^10.0|^11.0
spatie/laravel-package-tools Version ^1.16.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 envor/laravel-database-manager contains the following files

Loading the files please wait ....