@@ -268,7 +268,7 @@ function old($key = null, $default = null)
268268 */
269269 function redirect ($ to = null , $ status = 302 , $ headers = [], $ secure = null )
270270 {
271- $ redirector = new Laravel \Lumen \Http \Redirector (Container:: getInstance ()-> make ( ' app ' ));
271+ $ redirector = new Laravel \Lumen \Http \Redirector (app ( ));
272272
273273 if (is_null ($ to )) {
274274 return $ redirector ;
@@ -289,7 +289,7 @@ function redirect($to = null, $status = 302, $headers = [], $secure = null)
289289 */
290290 function response ($ content = '' , $ status = 200 , array $ headers = [])
291291 {
292- $ factory = new Laravel \Lumen \Http \ResponseFactory (Container:: getInstance ()-> make ( ' app ' )) ;
292+ $ factory = new Laravel \Lumen \Http \ResponseFactory ;
293293
294294 if (func_num_args () === 0 ) {
295295 return $ factory ;
@@ -326,14 +326,16 @@ function route($name, $parameters = [])
326326 */
327327 function session ($ key = null , $ default = null )
328328 {
329+ $ session = app ('session ' );
330+
329331 if (is_null ($ key )) {
330- return Container:: getInstance ()-> make ( ' session ' ) ;
332+ return $ session ;
331333 }
332334 if (is_array ($ key )) {
333- return Container:: getInstance ()-> make ( ' session ' ) ->put ($ key );
335+ return $ session ->put ($ key );
334336 }
335337
336- return Container:: getInstance ()-> make ( ' session ' ) ->get ($ key , $ default );
338+ return $ session ->get ($ key , $ default );
337339 }
338340}
339341
@@ -414,7 +416,7 @@ function url($path = null, $parameters = [], $secure = null)
414416 */
415417 function view ($ view = null , $ data = [], $ mergeData = [])
416418 {
417- $ factory = Container:: getInstance ()-> make ('view ' );
419+ $ factory = app ('view ' );
418420
419421 if (func_num_args () === 0 ) {
420422 return $ factory ;
0 commit comments