Laravel Remote
![Software License][ico-license]
![Coverage Status][ico-scrutinizer]
![Total Downloads][ico-downloads], (*1)
Laravel Remote supports Laravel 5.* currently., (*2)
Install
Via Composer, (*3)
``` bash
$ composer require larasoft/laravel-remote dev-master, (*4)
Add following two providers in providers array of "config/app.php".
``` php
'providers' => [
...
\Larasoft\LaravelRemote\LaravelRemoteServiceProvider::class,
Spatie\Backup\BackupServiceProvider::class,
];
Run "php artisan vendor:publish" in project root to publish config files and middleware., (*5)
Step 1 (Required)
In "app/Http/Kernel.php, replace "\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class" with "LaravelRemoteCheckForMaintenanceMode::class" in "$middleware" array., (*6)
In "config/remote.php", replace 'LARAVEL_REMOTE_KEY' with your generated key in Laravel Remote Dashboard.
``` php
return [
'key' => env('LARAVEL_REMOTE_KEY'),
'url' => env('LARAVEL_REMOTE_URL')
];, (*7)
### Step 2 (Required for Database Backups feature)
Configure your config/database.php as follows to enable Backups of your database.
'connections' => [
'mysql' => [
'dump_command_path' => '/path/to/the/binary', // only the path, so without 'mysqldump' or 'pg_dump'
'dump_command_timeout' => 60 * 5, // 5 minute timeout
'dump_using_single_transaction' => true, // perform dump using a single transaction
'driver' => 'mysql',
...
],, (*8)
For more information regarding Database backups visit: https://docs.spatie.be/laravel-backup/v3/introduction
### Step 3 (Required for Failed Job Notification feature)
In "config/remote.php", replace 'LARAVEL_REMOTE_URL' with base URL of Laravel Remote Dashboard (without trailing /). e.g: http://laravel-remote.com
``` php
return [
'key' => env('LARAVEL_REMOTE_KEY'),
'url' => env('LARAVEL_REMOTE_URL')
];
Add following entry in $listen array of App\Providers\EventServiceProvider.
``` php
protected $listen = [
LaravelRemoteJobFailed::class => [
ListenLaravelRemoteJobFailed::class,
],
...
];, (*9)
Override failed() method in your job classes i.e. in app/Jobs directory as follows.
``` php
public function failed()
{
$data = ['job' => class_basename($this)];
event(new LaravelRemoteJobFailed($data));
...
}
That's it., (*10)
Usage
Use Laravel Remote Dashboard to manage your Apps. Enjoy!, (*11)
Change log
Please see CHANGELOG for more information what has changed recently., (*12)
Testing
bash
$ composer test
, (*13)
Contributing
Please see CONTRIBUTING and CONDUCT for details., (*14)
Security
If you discover any security related issues, please email :author_email instead of using the issue tracker., (*15)
Credits
License
The MIT License (MIT). Please see License File for more information., (*16)