diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7fec8f2..aa797d1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -28,4 +28,4 @@ $ vendor/bin/phpunit If the test suite passes on your local machine you should be good to go. -When you make a pull request, the tests will automatically be run again by GitHub Actions on multiple php versions and hhvm. +When you make a pull request, the tests will automatically be run again by [Travis CI](https://travis-ci.org/) on multiple php versions and hhvm. diff --git a/README.md b/README.md index 0fb7a73..783a25e 100644 --- a/README.md +++ b/README.md @@ -9,33 +9,19 @@ Workbench Component is a simple package that has been designed to help you previ [![Latest Unstable Version](https://poser.pugx.org/orchestra/workbench/v/unstable)](https://packagist.org/packages/orchestra/workbench) [![License](https://poser.pugx.org/orchestra/workbench/license)](https://packagist.org/packages/orchestra/workbench) -### `testbench.yaml` Example - -```yaml -workbench: - welcome: true - install: true - start: /nova - user: taylor@laravel.com - guard: web - sync: - - from: ./public/ - to: public/vendor/nova - build: - - asset-publish - - create-sqlite-db - - migrate:refresh - assets: - - nova-assets - -purge: - directories: [] - files: [] -``` - -### Commands - -* `workbench:install` -* `workbench:build` -* `workbench:create-sqlite-db` -* `workbench:drop-sqlite-db` +## Official Documentation + +Documentation for Workbench can be found on the [packages.tools/workbench](https://packages.tools/workbench). + +## Contributing + +Thank you for considering contributing to Workbench! You can read the contribution guide [here](CONTRIBUTING.md). + +## Code of Conduct + +In order to ensure that the community is welcoming to all, please review and abide by the [Code of Conduct](CODE_OF_CONDUCT.md). + +## License + +Workbench is open-sourced software licensed under the [MIT license](LICENSE). + diff --git a/src/Bootstrap/DiscoverRoutes.php b/src/Bootstrap/DiscoverRoutes.php deleted file mode 100644 index 6654bd6..0000000 --- a/src/Bootstrap/DiscoverRoutes.php +++ /dev/null @@ -1,58 +0,0 @@ - false, - 'api' => false, - 'commands' => false, - 'views' => false, - ]; - - tap($app->make('router'), static function (Router $router) use ($config) { - foreach (['web', 'api'] as $group) { - if (($config[$group] ?? false) === true) { - if (file_exists($route = Workbench::path("routes/{$group}.php"))) { - $router->middleware($group)->group($route); - } - } - } - }); - - if ($app->runningInConsole() && ($config['commands'] ?? false) === true) { - if (file_exists($console = Workbench::path('routes/console.php'))) { - require $console; - } - } - - after_resolving($app, 'view', static function ($view, $app) use ($config) { - /** @var \Illuminate\Contracts\View\Factory $view */ - $path = Workbench::path('/resources/views'); - - if (($config['views'] ?? false) === true && method_exists($view, 'addLocation')) { - $view->addLocation($path); - } - - $view->addNamespace('workbench', $path); - }); - } -} diff --git a/src/WorkbenchServiceProvider.php b/src/WorkbenchServiceProvider.php index e7237ea..c1b58b7 100644 --- a/src/WorkbenchServiceProvider.php +++ b/src/WorkbenchServiceProvider.php @@ -7,7 +7,6 @@ use Illuminate\Contracts\Http\Kernel as HttpKernel; use Illuminate\Support\ServiceProvider; use Orchestra\Canvas\Core\PresetManager; -use Orchestra\Testbench\Contracts\Config; use Orchestra\Testbench\Foundation\Events\ServeCommandEnded; use Orchestra\Testbench\Foundation\Events\ServeCommandStarted; @@ -55,9 +54,5 @@ public function boot(): void $event->listen(ServeCommandEnded::class, [Listeners\RemoveAssetSymlinkFolders::class, 'handle']); }); } - - $this->callAfterResolving(Config::class, static function ($config, $app) { - (new Bootstrap\DiscoverRoutes())->bootstrap($app); - }); } }