micheledamo/laravel-web-artisan

This package allows you to execute artisan commands in a simple way using the browser window. If you don't have SSH access to the hosting platform where your Laravel site is hosted, this solution allows you to run commands like "php artisan migrate".

Installs: 38

Dependents: 0

Suggesters: 0

Security: 0

Stars: 6

Watchers: 1

Forks: 3

Open Issues: 0

Language:HTML

Type:package

v1.1.1 2020-06-12 12:53 UTC

This package is auto-updated.

Last update: 2024-11-12 22:37:49 UTC


README

Laravel Web Artisan

Latest Version on Packagist Software License Quality Score Total Downloads

This package allows you to execute Artisan commands in a simple way using the browser window. If you don't have SSH access to the hosting platform where your Laravel site is hosted, this solution allows you to run commands like "php artisan migrate" in a virtual shell on the browser.

This package requires Laravel 5.8 or higher.

Preview

Installation

Require this package with Composer on your Laravel project.

$ composer require micheledamo/laravel-web-artisan

Laravel uses Package Auto-Discovery, so you don't need to manually add the ServiceProvider.

The Web Artisan window will be enabled when WEBARTISAN_ENABLED is true, on your .env project file.
The following line must be added in the .env file of your Laravel project to enable the Web Artisan window, otherwise it is disabled by default.

WEBARTISAN_ENABLED=true

By default Laravel Web Artisan needs an authentication before you can run commands into the window terminal.

We recommend to always use authentication to prevent commands from being executed by anyone when the window is enabled.

WEBARTISAN_USERNAME=myusername
WEBARTISAN_PASSWORD=mypassword

If you want to use Web Artisan without authentication you can change use_authentication to false in the config/webartisan.php config file.

In this case, you should publish the config/webartisan.php config file with:

php artisan vendor:publish --provider="Micheledamo\LaravelWebArtisan\LaravelWebArtisanServiceProvider"

and than you can edit it.

Usage

Simply, in any page of your site, if the Web Artisan is enabled, you will see a terminal window appear at the bottom of the page.
Authenticate yourself with the credentials set in the .env file, if you use Web Artisan with authentication, and run any type of Artisan command, even custom ones, as in a terminal shell: et voilĂ , the magic!

Usage example

Change log

Please see CHANGELOG for more information on what has changed recently.

Credits

License

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