diff --git a/README.md b/README.md index 071b305..cdad665 100644 --- a/README.md +++ b/README.md @@ -28,8 +28,8 @@ Installation It is a Composer package for the Laravel framework. - Install it (`composer require mightypork/php-sandbox`), then `composer dump-autoload`. -- Add the service provider to your `config/app.php` file (providers section): - `MightyPork\PhpSandbox\PhpSandboxServiceProvider::class` +- The service provider should be automatically found by Laravel via the discover functionality. + If it is not, add the service provider to your `config/app.php` file (providers section): `MightyPork\PhpSandbox\PhpSandboxServiceProvider::class` - Run `php artisan vendor:publish` and select the package; this copies the JS and CSS assets to your public folder, and creates the config file (`config/php-sandbox.php`). - Add `ENABLE_PHP_SANDBOX=true` to your .env file to enable access diff --git a/composer.json b/composer.json index 96aefc4..65b418b 100644 --- a/composer.json +++ b/composer.json @@ -17,5 +17,12 @@ "psr-4": { "MightyPork\\PhpSandbox\\": "src/" } + }, + "extra": { + "laravel": { + "providers": [ + "MightyPork\\PhpSandbox\\PhpSandboxServiceProvider" + ] + } } }