larasoft/laravel-remote

Manage your Laravel Applications remotely.

dev-master / 1.0.x-dev 2018-01-02 11:15 UTC

This package is auto-updated.

Last update: 2024-12-26 23:16:57 UTC


README

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

Laravel Remote supports Laravel 5.* currently.

Install

Via Composer

$ composer require larasoft/laravel-remote dev-master

Add following two providers in providers array of "config/app.php".

'providers' => [
    ...
    \Larasoft\LaravelRemote\LaravelRemoteServiceProvider::class,
    Spatie\Backup\BackupServiceProvider::class,
    
    ];

Run "php artisan vendor:publish" in project root to publish config files and middleware.

Configure

Step 1 (Required)

In "app/Http/Kernel.php, replace "\Illuminate\Foundation\Http\Middleware\CheckForMaintenanceMode::class" with "LaravelRemoteCheckForMaintenanceMode::class" in "$middleware" array.

In "config/remote.php", replace 'LARAVEL_REMOTE_KEY' with your generated key in Laravel Remote Dashboard.

return [
    'key' => env('LARAVEL_REMOTE_KEY'),
    'url' => env('LARAVEL_REMOTE_URL')
];

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',
		...
	],

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

return [
    'key' => env('LARAVEL_REMOTE_KEY'),
    'url' => env('LARAVEL_REMOTE_URL')
];

Add following entry in $listen array of App\Providers\EventServiceProvider.

protected $listen = [
    LaravelRemoteJobFailed::class => [
        ListenLaravelRemoteJobFailed::class,
    ],
    ...
];

Override failed() method in your job classes i.e. in app/Jobs directory as follows.

    public function failed()
    {
        $data = ['job' => class_basename($this)];
        event(new LaravelRemoteJobFailed($data));
        
        ...
    }

That's it.

Usage

Use Laravel Remote Dashboard to manage your Apps. Enjoy!

Change log

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Security

If you discover any security related issues, please email :author_email instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.