Download the PHP package hiddeco/laravel-transip without Composer
On this page you can find all versions of the php package hiddeco/laravel-transip. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-transip
Laravel TransIP
Laravel TransIP provides a bridge between the TransIP package and Laravel 5.*.
Installation
To use this package without running into trouble you will need PHP 5.5+ or HHVM 3.6+, and Composer.
-
Get the latest version of Laravel TransIP, add the following line to your composer.json file
"hiddeco/laravel-transip": "~5.3"
-
Run
composer update
orcomposer install
-
Register the Laravel TransIP service provider in
config/app.php
by adding'TransIP\Laravel\TransIPServiceProvider::class'
to the providers key - Add the
TransIP
facade to the aliases key:'TransIP' => TransIP\Laravel\Facades\TransIP::class
Configuration
To manage your TransIP connections run the php artisan vendor:publish
command, this will create the config/transip.php
file where you can modify and manage your client connections.
The following configuration options are available:
Default Connection Name
The TransIP connection name set here (default
) is the default connection used for all API requests. However, you may
use as many connections as you need using the manager class. The default setting is 'main'
.
TransIP Connections
This is the place to configure your TransIP connections (connections
). A default configuration with possible
options (except your API credentials) is already present and there is no limit to the amount of connections.
Each connection has 2 required fields (username
and private_key
) and 2 optional fields (mode
and endpoint
).
It is worth mentioning the mode
field only accepts readonly
and readwrite
as values.
Usage
TransIP Manager
The TransIPManager
is where the magic happens. Bounded to the ioc container as transip
and accessible by using the
Facade\TransIP
facade. It uses parts of the Laravel Manager
package to manage the TransIP client connections. For more information about the Manager you should check out the respective
docs.
It is worth noting the connection returned will always be an instance of \HiddeCo\TransIP\Client
. You
can find more information about this instance and its methods in the TransIP docs.
TransIP Facade
The TransIP facade will pass static method calls to the transip
object in the ioc container, which as stated
before is the TransIPManager
class.
Examples
The usage of this package is fairly simple. Add your TransIP API credentials to the main
connection and the package
will work without any further settings.
Using the Facade
``
Using the TransIP Manager
The TransIPManager
returns an instance of \HiddeCo\TransIP\Client
and will behave like it. If
you want to call a specific connection, you can use the connection
method:
``
Changing the default connection and further explanations:
``
Dependency Injection
Prefer the use of a dependency injection over facades? You can easily inject the manager:
``
License
Laravel TransIP is licensed under The MIT License (MIT).
All versions of laravel-transip with dependencies
illuminate/support Version 5.0.*|5.1.*|5.2.*|5.3.*|5.4.*|5.5.*|5.6.*|5.7.*|5.8.*|^6.0
graham-campbell/manager Version ~3.0|~4.0
hiddeco/transip Version ~5.7
laravel/helpers Version ^1.0