huangdijia/laravel-web-soar

Artisan soar in your browser

1.1.0 2020-03-05 08:34 UTC

This package is auto-updated.

Last update: 2020-05-05 09:00:34 UTC


README

Latest Stable Version Total Downloads GitHub license

screenshots

Installation

composer require huangdijia/laravel-web-soar --dev

Publish

php artisan vendor:publish --provider="Huangdijia\WebSoar\WebSoarServiceProvider"
php artisan web-soar:install

Download soar

# macOS
wget https://github.com/XiaoMi/soar/releases/download/0.11.0/soar.darwin-amd64 -O vendor/bin/soar
# linux
wget https://github.com/XiaoMi/soar/releases/download/0.11.0/soar.linux-amd64 -O vendor/bin/soar
# windows
wget https://github.com/XiaoMi/soar/releases/download/0.11.0/soar.windows-amd64 -O vendor/bin/soar
# authorization
chmod +x vendor/bin/soar

Configure

Env

SOAR_ENABLED=true
SOAR_HINT_ENABLED=true
SOAR_HINT_CONNECTION=mysql
SOAR_PATH=/usr/local/bin/soar # linux
SOAR_TEST_DSN_HOST=127.0.0.1
SOAR_TEST_DSN_PORT=3306
SOAR_TEST_DSN_DBNAME=yourdb
SOAR_TEST_DSN_USER=root
SOAR_TEST_DSN_PASSWORD=
SOAR_LOG_OUTPUT=/tmp/soar.log
SOAR_REPORT_TYPE=markdown

Gate

// AuthServiceProvider
Gate::define('viewWebSoar', function($user = null) {
    return app()->environment('local', 'dev');
});

Run

Thanks