-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e1c077e
commit 7cca184
Showing
1 changed file
with
36 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,42 @@ | ||
# ServerPilot PHP API Wrapper for Laravel 5 | ||
Version: 1.0.0 | ||
|
||
This is a Laravel 5.x wrapper for Dave Rogers' excellent [ServerPilot PHP API](https://github.com/daverogers/serverpilot-php). It comes with Service Container binding and Facade alias. | ||
|
||
## Installation | ||
1. Run `composer require lesaff/laravel-serverpilot` | ||
2. Grab ServerPilot's API ID and Key from your SP's admin panel | ||
3. Set `SERVERPILOT_API_ID` and `SERVERPILOT_API_KEY` in your `.env` file | ||
4. Edit `app/config/app.php`, | ||
add the following to your providers' array | ||
``` | ||
Lesaff\LaravelServerPilot\ServerPilotServiceProvider::class, | ||
``` | ||
add the following to your class aliases array | ||
``` | ||
'SP' => Lesaff\LaravelServerPilot\Facades\ServerPilot::class, | ||
``` | ||
|
||
## Usage | ||
|
||
As a **Facade** | ||
``` | ||
$servers = \SP::server_list(); | ||
``` | ||
|
||
As a **Dependency injection** | ||
``` | ||
Route::get('/servers', function (\Lesaff\LaravelServerPilot $sp) { | ||
$servers = $sp->server_list(); | ||
}); | ||
``` | ||
|
||
For full PHP API usage, please refer to https://github.com/daverogers/serverpilot-php | ||
|
||
by Rudy Affandi (2017) | ||
https://githubb.com/lesaff/laravel-serverpilot | ||
|
||
Version: 1.0.0 | ||
|
||
|
||
|
||
** Work in Progress ** |