Download the PHP package andrewlamers/eloquent-rest-bridge without Composer

On this page you can find all versions of the php package andrewlamers/eloquent-rest-bridge. 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 eloquent-rest-bridge

Eloquent Rest Bridge

A connection driver for the illuminate database manager that forwards sql statements over http to a service running on the target host machine.

This significantly reduces the transfer size of traditional connections made over a tcp connection.

The host machine will execute the sql statements and return the results back in json format that gets parsed back into the database manager as if it was a direct database connection.

SSL is supported but not required as all request and response bodies are encrypted by AES with a pre-shared key.

This is only really useful for retrieving results through a limited bandwidth connection, or through firewalls. The reduced transfer size allows response times to be much quicker than tunneling raw database commands through a port over SSH.

Installation

composer require andrewlamers/eloquent-rest-bridge

Laravel Service Provider

Include this in your config/app.php list of service providers.

Andrewlamers\EloquentRestBridge\ServiceProvider::class

Laravel configuration file

There is an included configuration file for laravel that allows you to modify configuration of the rest bridge.

To move the configuration file to your projects config/ folder use the following command.

php artisan vendor:publish --provider="Andrewlamers\EloquentRestBridge\ServiceProvider"

Configuration Options

return array(
    'encryption' => [

        /*
         * Available ciphers are AES-256-CBC and AES-128-CBC
         */
        'cipher' => env('REST_BRIDGE_CIPHER', 'AES-256-CBC'),

        /*
         * The key must match the cipher. AES-256 must be a 32 bit key, and AES-128 must be a 16 byte key
         * You can use the php artisan key:generate --show command to generate a key. Do not use the same key as your application.
         * The encrypter will look for the key in the environment value with the key name specified here.
        */
        'key'    => 'REST_BRIDGE_KEY'
    ],
    /*
     * The url that is listening for sql commands to return results from.
     */
    'url'        => env('REST_BRIDGE_URL'),
    'log' => [
        /*
        * Enable logging of requests, responses, and sql commands.
        */
        'enabled' => false,
        /*
         * Base path for the log files. It will create 3 log files for requests, responses, and sql queries.
         */
        'base_path' => storage_path('logs/')
    ],
    'daemon' => [
        'enabled' => false,
        'route' => '_rest_bridge/handler'
    ]
);

Example database configuration

In your database configuration the 'rest' driver will be available. It needs to know the connection you want to use.

'my-db-connection' => [
    'driver'   => 'sqlsrv',
    'host'     => env('SQLSRV_HOST', ''),
    'database' => env('SQLSRV_DATABASE', ''),
    'username' => env('SQLSRV_USERNAME', ''),
    'password' => env('SQLSRV_PASSWORD', ''),
    'charset'  => 'utf8',
    'prefix'   => '',
],
'my-rest-connection' => [
    'driver' => 'rest',
    'connection' => 'my-db-connection'
]

The rest driver will forward the configuration options to the daemon listening for commands.


All versions of eloquent-rest-bridge with dependencies

PHP Build Version
Package Version
Requires guzzlehttp/guzzle Version ~6
illuminate/support Version ^5.1
illuminate/container Version ^5.1
illuminate/database Version ^5.1
illuminate/events Version ^5.1
illuminate/encryption Version ^5.1
illuminate/http Version ^5.1
illuminate/console Version ^5.1
illuminate/routing 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 andrewlamers/eloquent-rest-bridge contains the following files

Loading the files please wait ....