Skip to content

Commit ef3e2b5

Browse files
committed
update laravel-hookable package; bump version to 1.0.4 and refine facade implementation
1 parent 6c7df4f commit ef3e2b5

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "saschaende/laravel-hookable",
3-
"version": "1.0.3",
3+
"version": "1.0.4",
44
"description": "The WordPress filter/action system in Laravel",
55
"keywords": [
66
"laravel",
@@ -35,11 +35,11 @@
3535
"laravel": {
3636
"providers": [
3737
"SaschaEnde\\Hookable\\HookableServiceProvider"
38-
]
39-
},
40-
"aliases": {
41-
"Hookable": "SaschaEnde\\Hookable\\Facades\\Hookable"
42-
}
38+
],
39+
"aliases": {
40+
"Hookable": "SaschaEnde\\Hookable\\Facades\\Hookable"
41+
}
42+
}
4343
},
4444
"minimum-stability": "stable",
4545
"prefer-stable": true

src/Facades/Hookable.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,17 @@
55
use Illuminate\Support\Facades\Facade;
66

77
/**
8-
* @see \Hookable
8+
* @method static void action(string $name, callable $callback, int $priority = 10)
9+
* @method static void filter(string $name, callable $callback, int $priority = 10)
10+
* @method static mixed applyFilters(string $name, mixed $value = null, ...$params)
11+
* @method static string renderActions(string $name, ...$params)
12+
*
13+
* @see \SaschaEnde\Hookable\Hookable
914
*/
1015
class Hookable extends Facade
1116
{
1217
protected static function getFacadeAccessor(): string
1318
{
14-
return 'hookable';
19+
return \SaschaEnde\Hookable\Hookable::class;
1520
}
1621
}

src/HookableServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class HookableServiceProvider extends ServiceProvider
1010
public function register()
1111
{
1212
// Bind Hookable as a singleton
13-
$this->app->singleton('hookable', fn() => new Hookable());
13+
$this->app->singleton(\SaschaEnde\Hookable\Hookable::class, fn() => new Hookable());
1414
}
1515

1616
public function boot()

0 commit comments

Comments
 (0)