Skip to content
This repository has been archived by the owner on Jul 11, 2019. It is now read-only.
/ clockwork-web Public archive

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

Notifications You must be signed in to change notification settings

itsgoingd/clockwork-web

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •