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()
2727 __DIR__ . '/../config/image.php ' => config_path (Facades \Image::BINDING . '.php ' )
2828 ]);
2929
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+ });
4042 }
4143
4244 /**
You can’t perform that action at this time.
0 commit comments