Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,16 @@ Included is a service provider for the Laravel framework. This service provider

Register `JasonLewis\ResourceWatcher\Integration\LaravelServiceProvider` in the array of providers in `app/config/app.php`.

Register `'Watcher' => 'JasonLewis\ResourceWatcher\Integration\Watcher',` in the array of aliases in `app/config/app.php`.

```php
$listener = $app['watcher']->watch('path/to/resource');

// Or if you don't have access to an instance of the application container.
$listener = app('watcher')->watch('path/to/resource');

// Or access globally via a application container facade.
$listener = Watcher::watch('path/to/resource');
```

## License
Expand Down
11 changes: 11 additions & 0 deletions src/JasonLewis/ResourceWatcher/Integration/LaravelFacade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace JasonLewis\ResourceWatcher\Integration;

use Illuminate\Support\Facades\Facade;

class Watcher extends Facade {

protected static function getFacadeAccessor() { return 'watcher'; }

}