Download the PHP package placetopay/cerberus without Composer

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

Placetopay multitenancy package

This package is based on the third version of package spatie/laravel-multitenancy.

Because it is a customization, it requires override steps mentioned below for proper installation.

More information about the package.

This package aims to standardize the configuration of the tenants table of the landlord database, in addition to reducing the number of queries made to the same database by using cache.

Prerequsites

Installation

This package can be installed via composer:

Publishing the config file

You must publish the config file:

Publishing the migrate file

Create storage folder by tenancy

This is allowed to run only if the application has the configuration variable multitenancy.suffix_storage_path set to true.

How to use

After publish the config and migrations files, you need to create a new connection in config/database.php, This connection will allow the management of the landlord database, in which the tenants of the application will be stored.

The migration of the landlord table in relation to the spatie package was modified, adding a config field of json type, with which it's intended to centralize the configuration that is carried out in front of each tenant, in this field you can define the connection to the database using the following structure.

You can add all configurations that you needed, this json will be convert in array dot structure and then will be set in the laravel config.

Additionally, the variable APP_IDENTIFIER is provided in the file config/multitenancy.php which will be the project identifier

Execute migrations

To execute the migrations of the landlord database, it's necessary to specify the connection and the path to the folder where the migrations are located: `

Jobs

You need to update the connection and tables for jobs and failed_jobs, config/queue.php:

Storage

This package will overwrite the Storage Facade by default, setting a tenant's name as a prefix for folders that use with Storage Facade, if you need to suffix the storage_path() method too, you need to set to true the variable suffix_storage_path in config/multitenant.php file.

How change the commands

To execute any command for one tenant you need to execute the next command structure

Addig the --tenant={tenant_domain} flag, will be executed the commando only for the specific tenant, without this it will execute by each tenant.

translatable attributes

You can use the translate method in the tenant model to translate some keys from the config JSON. This method uses the app locale and fallback to search the correct values from the JSON, addionaly you should use a config/tenant.php file to set default values for translations in case if doesn't exist in the JSON data:

Json data from database

Default values in config/tenant.php:

Example of use:

Clear cache remotely

Probably you need to clear the app cache when you update the tenant information, to do this Cerberus publish a new POST route clean-cache that you can call from another application.

this route use middleware to validate if the application can be connected, this is an example of how you need to make the request

You need to set this header in the request to clean the cache


All versions of cerberus with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
ext-json Version *
spatie/laravel-multitenancy Version ^3.0
eduarguz/shift-php-cs Version ^3.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 placetopay/cerberus contains the following files

Loading the files please wait ....