We also need to setup a Clockwork REST API endpoint. Right before sending a response, we need to tell Clockwork to resolve and store metadata for current request. If you are using a dependency injection container it might be a good idea register the Clockwork instance. $clockwork = Clockwork\Support\Vanilla\Clockwork::init() Initialize Clockwork early in your application. Note: For collecting database queries you'll need to enable $app->withEloquent() in bootstrap/app.php, this has no performance impact if your app executes database queries on most requests. To enable more features like commands or queue jobs profiling use enviroment variables, see full list of available settings. Once Clockwork is installed, you need to register the Clockwork service provider, in your bootstrap/app.php: 'Clockwork' => Clockwork\Support\Laravel\Facade::class, If you'd like to use the Facade, add following to your config/app.php: Old Laravelįor Laravel versions older than 5.5, you'll need to register the service provider, in your config/app.php:Ĭlockwork\Support\Laravel\ClockworkServiceProvider::class Note: If you are using the Laravel route cache, you will need to refresh it using the route:cache Artisan command. Install the Clockwork library via Composer.Ĭongratulations, you are done! To enable more features like commands or queue jobs profiling, publish the configuration file via the vendor:publish Artisan command.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |