huangdijia / laravel-web-soar
Artisan soar in your browser
Fund package maintenance!
huangdijia
hdj.me/sponsors
Installs: 116
Dependents: 0
Suggesters: 0
Security: 0
Stars: 18
Watchers: 2
Forks: 0
Open Issues: 0
Language:JavaScript
Requires
- php: >=7.2
- guanguans/soar-php: ^2.0
- illuminate/cookie: ^7.0|^8.0
- illuminate/session: ^7.0|^8.0
- illuminate/support: ^7.0|^8.0
- symfony/process: ^5.3
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.04
- laravel/framework: ^8.0
- phpstan/phpstan: ^0.12
README
Installation
composer require huangdijia/laravel-web-soar --dev
Publish
# php artisan vendor:publish --provider="Huangdijia\WebSoar\WebSoarServiceProvider"
php artisan web-soar:install
php artisan web-soar:publish
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'); });