Skip to content

Commit 4ae98ef

Browse files
byt3sagejaetooledevtaylorotwell
authored
[10.x] Adding Pipeline Facade (#46271)
* feat: added in pipeline facade, added singleton binding * Changed singleton to simple bind * chore: disabled caching of instance on pipeline facade, added in docblocks * formatting * Update facade docblocks --------- Co-authored-by: jaetooledev <[email protected]> Co-authored-by: Taylor Otwell <[email protected]> Co-authored-by: taylorotwell <[email protected]>
1 parent 552f353 commit 4ae98ef

File tree

2 files changed

+28
-1
lines changed

2 files changed

+28
-1
lines changed

src/Illuminate/Pipeline/PipelineServiceProvider.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@ class PipelineServiceProvider extends ServiceProvider implements DeferrableProvi
1616
public function register()
1717
{
1818
$this->app->singleton(
19-
PipelineHubContract::class, Hub::class
19+
PipelineHubContract::class,
20+
Hub::class
2021
);
22+
23+
$this->app->bind('pipeline', fn ($app) => new Pipeline($app));
2124
}
2225

2326
/**
@@ -29,6 +32,7 @@ public function provides()
2932
{
3033
return [
3134
PipelineHubContract::class,
35+
'pipeline',
3236
];
3337
}
3438
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
<?php
2+
3+
namespace Illuminate\Support\Facades;
4+
5+
class Pipeline extends Facade
6+
{
7+
/**
8+
* Indicates if the resolved instance should be cached.
9+
*
10+
* @var bool
11+
*/
12+
protected static $cached = false;
13+
14+
/**
15+
* Get the registered name of the component.
16+
*
17+
* @return string
18+
*/
19+
protected static function getFacadeAccessor()
20+
{
21+
return 'pipeline';
22+
}
23+
}

0 commit comments

Comments
 (0)