File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed
Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -332,6 +332,17 @@ public static function cookies(?string $key = null)
332332 Cookie::get ($ key );
333333 }
334334
335+ /**
336+ * Display a flash message from the previous request
337+ *
338+ * @param string|null $key The key to get from the flash data
339+ * @return array|string|null
340+ */
341+ public static function flash (?string $ key = null )
342+ {
343+ return \Leaf \Flash::display ($ key );
344+ }
345+
335346 /**
336347 * Does the Request body contain parsed form data?
337348 * @return bool
@@ -340,7 +351,7 @@ public static function isFormData(): bool
340351 {
341352 $ method = static ::getMethod ();
342353
343- return ($ method === static ::METHOD_POST && is_null ( static ::getContentType ()) ) || in_array (static ::getMediaType (), static ::$ formDataMediaTypes );
354+ return ($ method === static ::METHOD_POST && static ::getContentType () === null ) || in_array (static ::getMediaType (), static ::$ formDataMediaTypes );
344355 }
345356
346357 /**
You can’t perform that action at this time.
0 commit comments