Download the PHP package cybex/laravel-protector without Composer

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

Laravel Protector

Latest Version on Packagist

This package allows you to download, export and import your application's database backups.

Common usage scenarios

Feature set

Supported databases

Notes

Table of contents

Usage

Export to file

To save a copy of your local database, run

By default, dumps are stored in storage/app/protector on your default project disk. You can configure the target disk, filename, etc. by publishing the protector config file to your project

Import

Run the following command for an interactive shell

Importing a specific source

To download and import the server database in one go, run

When used with other options, remote will serve as fallback behavior.

To import a specific database file that you downloaded earlier, run

Or just reference the database file name in the protector folder (default folder is storage/app/protector).

To import the latest existing database file, run

Options

If you want to run migrations after the import of the database file, run

For automation, also consider the flush option to clean up older database files, and the force option to bypass user interaction.

To learn more about import options, run

Setup instructions

Find below three common scenarios of usage. These are not mutually exclusive.

Setup for storing the local database

If you only want to store a copy of your local database to a disk, the setup is pretty simple.

Installing protector in your local Laravel project

Install the package via composer.

You can optionally publish the protector config to set the following options

Local usage

You can now use the artisan command to write a backup to the protector storage folder.

By default, the file will be stored in storage/protector and have a timestamp in the name. You can also specify the filename.

You could also automate this by

Setup for importing the database of a remote server

This package can run on both servers and client machines of the same software repository. You set up authorized developers on the server, and give them the key for their local machine.

Installing protector in your Laravel project

Install the package via composer.

In your User model class, add the following trait.

Publish the protector database migration, and optionally modify it to work with your project.

Run the migration on the client and server repository.

You can optionally publish the protector config to set options regarding the storage, access and transmission of the files.

On the client machine

Run the following command to receive

Your server admin will then give you the token and server-url to save in your .env file. Unless specified otherwise in your software, the .env keys are

Do not give your private key to anyone and keep it protected at all time

See Usage on how to import the remote database.

Downloaded database dump files are stored unencrypted

On the server

Make sure that the server is accessible to the client machine via HTTPS.

When one of your developers gives you their public key from the previous step, you can authorize them with:

You will receive the token and url to give back to the developer, who has to save them in their .env file.

The developer can then download and import the server database on their own.

Setup for collecting backups from multiple servers

You can develop a custom client that can access and store remote server backups. The servers can be different Laravel projects that have the protector package installed.

See the previous chapter on how to give your backup client access to all servers. The backup client will need an according user on each target server.

See cybex-gmbh/collector for an example implementation.

Migration guide from Protector v1.x to v2.x

Likelihood of impact: high

Likelihood of impact: low

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

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

Laravel Package Boilerplate

This package was generated using the Laravel Package Boilerplate.


All versions of laravel-protector with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
ext-curl Version *
ext-json Version *
ext-mbstring Version *
ext-pdo Version *
ext-sodium Version *
guzzlehttp/guzzle Version ^7.4
illuminate/support Version ^11.0
laravel/framework Version ^11.0
laravel/sanctum Version ^4.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 cybex/laravel-protector contains the following files

Loading the files please wait ....