@@ -84,7 +84,7 @@ protected function bindPHPExcelClass()
8484 $ me = $ this ;
8585
8686 // Bind the PHPExcel class
87- $ this ->app [ 'phpexcel ' ] = $ this -> app -> share ( function () use ($ me )
87+ $ this ->app -> singleton ( 'phpexcel ' , function () use ($ me )
8888 {
8989 // Set locale
9090 $ me ->setLocale ();
@@ -105,7 +105,7 @@ protected function bindPHPExcelClass()
105105 protected function bindCssParser ()
106106 {
107107 // Bind css parser
108- $ this ->app [ 'excel.parsers.css ' ] = $ this -> app -> share ( function ()
108+ $ this ->app -> singleton ( 'excel.parsers.css ' , function ()
109109 {
110110 return new CssParser (
111111 new CssToInlineStyles ()
@@ -120,7 +120,7 @@ protected function bindCssParser()
120120 protected function bindReaders ()
121121 {
122122 // Bind the laravel excel reader
123- $ this ->app [ 'excel.reader ' ] = $ this -> app -> share ( function ($ app )
123+ $ this ->app -> singleton ( 'excel.reader ' , function ($ app )
124124 {
125125 return new LaravelExcelReader (
126126 $ app ['files ' ],
@@ -130,7 +130,7 @@ protected function bindReaders()
130130 });
131131
132132 // Bind the html reader class
133- $ this ->app [ 'excel.readers.html ' ] = $ this -> app -> share ( function ($ app )
133+ $ this ->app -> singleton ( 'excel.readers.html ' , function ($ app )
134134 {
135135 return new Html (
136136 $ app ['excel.parsers.css ' ]
@@ -145,7 +145,7 @@ protected function bindReaders()
145145 protected function bindParsers ()
146146 {
147147 // Bind the view parser
148- $ this ->app [ 'excel.parsers.view ' ] = $ this -> app -> share ( function ($ app )
148+ $ this ->app -> singleton ( 'excel.parsers.view ' , function ($ app )
149149 {
150150 return new ViewParser (
151151 $ app ['excel.readers.html ' ]
@@ -160,7 +160,7 @@ protected function bindParsers()
160160 protected function bindWriters ()
161161 {
162162 // Bind the excel writer
163- $ this ->app [ 'excel.writer ' ] = $ this -> app -> share ( function ($ app )
163+ $ this ->app -> singleton ( 'excel.writer ' , function ($ app )
164164 {
165165 return new LaravelExcelWriter (
166166 $ app ->make (Response::class),
@@ -177,7 +177,7 @@ protected function bindWriters()
177177 protected function bindExcel ()
178178 {
179179 // Bind the Excel class and inject its dependencies
180- $ this ->app [ 'excel ' ] = $ this -> app -> share ( function ($ app )
180+ $ this ->app -> singleton ( 'excel ' , function ($ app )
181181 {
182182 $ excel = new Excel (
183183 $ app ['phpexcel ' ],
@@ -201,7 +201,7 @@ protected function bindExcel()
201201 protected function bindClasses ()
202202 {
203203 // Bind the format identifier
204- $ this ->app [ 'excel.identifier ' ] = $ this -> app -> share ( function ($ app )
204+ $ this ->app -> singleton ( 'excel.identifier ' , function ($ app )
205205 {
206206 return new FormatIdentifier ($ app ['files ' ]);
207207 });
0 commit comments