itsgoingd/clockwork-web

This package is abandoned and no longer maintained. No replacement package was suggested.

Embeddable webapp version of Clockwork, a Chrome extension for PHP development

Installs: 7 371

Dependents: 0

Suggesters: 0

Security: 0

Stars: 29

Watchers: 5

Forks: 5

Open Issues: 0

Language:JavaScript

v1.3.1 2015-08-01 15:01 UTC

This package is auto-updated.

Last update: 2020-02-10 22:38:21 UTC


README

Archived repository

This repository contains the archived source of Clockwork Web, an embeddable web version of Clockwork Chrome 1. This feature is now part of the main Clockwork server-side library https://github.com/itsgoingd/clockwork.

Clockwork

Clockwork is a Chrome extension for PHP development, extending Developer Tools with a new panel providing all kinds of information useful for debugging and profilling your PHP applications, including information about request, headers, get and post data, cookies, session data, database queries, routes, visualisation of application runtime and more.

This repository contains embeddable webapp version of Clockwork, supporting many modern browsers along Chrome. For more information see the original extansion repository.

Installation

This extension provides out of the box support for Laravel and Slim 2 frameworks, you can add support for any other or custom framework via an extensible API.

To install the latest version simply add it to your composer.json:

"itsgoingd/clockwork-web": "~1.3"

Laravel

Once Clockwork is installed, you need to register the Laravel service provider, in your app/config/app.php:

'providers' => array(
	...
    'Clockwork\Web\Support\Laravel\ClockworkWebServiceProvider'
)

By default, Clockwork will only be available in debug mode, you can change this and other settings in the configuration file. Use the following Artisan command to publish the configuration file into your config directory:

$ php artisan vendor:publish --provider='Clockwork\Web\Support\Laravel\ClockworkWebServiceProvider'

For Laravel 4 you can do the same with this command:

$ php artisan config:publish itsgoingd/clockwork-web --path vendor/itsgoingd/clockwork-web/Clockwork/Web/Support/Laravel/config/

When the service provider is registered, a variable "clockwork_web" will be available in your views, you should output it in your layout template as raw html, ideally just before body closing tag.

...
{!! $clockwork_web !!}
</body>

For Laravel 4:

...
{{ $clockwork_web }}
</body>

Slim 2

Once Clockwork is installed, you need to add the Slim middleware to your app:

$app = new Slim(...);
$app->add(new Clockwork\Web\Support\Slim\ClockworkWebMiddleware());

When the middleware is registered, a variable "clockwork_web" will be available in your views, you should output it in your layout template, ideally just before body closing tag.

...
<?= $clockwork_web ?>
</body>

Licence

Copyright (c) 2013 Miroslav Rigler

MIT License

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.