File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -25,11 +25,8 @@ class Request
2525 const METHOD_OPTIONS = 'OPTIONS ' ;
2626 const METHOD_OVERRIDE = '_METHOD ' ;
2727
28- /**
29- * @var array
30- */
31- protected static $ formDataMediaTypes = ['application/x-www-form-urlencoded ' ];
3228 protected static $ errors = [];
29+ protected static $ formDataMediaTypes = ['application/x-www-form-urlencoded ' ];
3330
3431 /**
3532 * Get HTTP method
@@ -353,6 +350,18 @@ public static function user()
353350 return static ::auth ()->user ();
354351 }
355352
353+ /**
354+ * Get data passed from the previous middleware
355+ *
356+ * @param string|null $key The key to get from the middleware data
357+ */
358+ public static function next ($ key = null )
359+ {
360+ $ middlewareData = \Leaf \Config::getStatic ('middleware.data ' );
361+
362+ return $ key ? $ middlewareData [$ key ] : $ middlewareData ;
363+ }
364+
356365 /**
357366 * Store a file from the request.
358367 *
You can’t perform that action at this time.
0 commit comments