File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -27,16 +27,18 @@ public function boot()
27
27
__DIR__ . '/../config/image.php ' => config_path (Facades \Image::BINDING . '.php ' )
28
28
]);
29
29
30
- // register response macro "image"
31
- if (!ResponseFacade::hasMacro (Facades \Image::BINDING )) {
32
- ResponseFacade::macro (Facades \Image::BINDING , function (
33
- Image $ image ,
34
- null |string |Format |MediaType |FileExtension $ format = null ,
35
- mixed ...$ options ,
36
- ): Response {
37
- return ImageResponseFactory::make ($ image , $ format , ...$ options );
38
- });
39
- }
30
+ $ this ->app ->booted (function (): void {
31
+ // register response macro "image"
32
+ if (!ResponseFacade::hasMacro (Facades \Image::BINDING )) {
33
+ ResponseFacade::macro (Facades \Image::BINDING , function (
34
+ Image $ image ,
35
+ null |string |Format |MediaType |FileExtension $ format = null ,
36
+ mixed ...$ options ,
37
+ ): Response {
38
+ return ImageResponseFactory::make ($ image , $ format , ...$ options );
39
+ });
40
+ }
41
+ });
40
42
}
41
43
42
44
/**
You can’t perform that action at this time.
0 commit comments