1 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,46 +0,0 @@ |
1 |
-<?php |
|
2 |
- |
|
3 |
-namespace Illuminate\Support\Facades; |
|
4 |
- |
|
5 |
-/** |
|
6 |
- * @method static void queue(...$parameters) |
|
7 |
- * @method static unqueue($name) |
|
8 |
- * @method static array getQueuedCookies() |
|
9 |
- * |
|
10 |
- * @see \Illuminate\Cookie\CookieJar |
|
11 |
- */ |
|
12 |
-class Cookie extends Facade |
|
13 |
-{ |
|
14 |
- /** |
|
15 |
- * Determine if a cookie exists on the request. |
|
16 |
- * |
|
17 |
- * @param string $key |
|
18 |
- * @return bool |
|
19 |
- */ |
|
20 |
- public static function has($key) |
|
21 |
- { |
|
22 |
- return ! is_null(static::$app['request']->cookie($key, null)); |
|
23 |
- } |
|
24 |
- |
|
25 |
- /** |
|
26 |
- * Retrieve a cookie from the request. |
|
27 |
- * |
|
28 |
- * @param string $key |
|
29 |
- * @param mixed $default |
|
30 |
- * @return string|array|null |
|
31 |
- */ |
|
32 |
- public static function get($key = null, $default = null) |
|
33 |
- { |
|
34 |
- return static::$app['request']->cookie($key, $default); |
|
35 |
- } |
|
36 |
- |
|
37 |
- /** |
|
38 |
- * Get the registered name of the component. |
|
39 |
- * |
|
40 |
- * @return string |
|
41 |
- */ |
|
42 |
- protected static function getFacadeAccessor() |
|
43 |
- { |
|
44 |
- return 'cookie'; |
|
45 |
- } |
|
46 |
-} |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,46 @@ |
1 |
+<?php |
|
2 |
+ |
|
3 |
+namespace Illuminate\Support\Facades; |
|
4 |
+ |
|
5 |
+/** |
|
6 |
+ * @method static void queue(...$parameters) |
|
7 |
+ * @method static unqueue($name) |
|
8 |
+ * @method static array getQueuedCookies() |
|
9 |
+ * |
|
10 |
+ * @see \Illuminate\Cookie\CookieJar |
|
11 |
+ */ |
|
12 |
+class Cookie extends Facade |
|
13 |
+{ |
|
14 |
+ /** |
|
15 |
+ * Determine if a cookie exists on the request. |
|
16 |
+ * |
|
17 |
+ * @param string $key |
|
18 |
+ * @return bool |
|
19 |
+ */ |
|
20 |
+ public static function has($key) |
|
21 |
+ { |
|
22 |
+ return ! is_null(static::$app['request']->cookie($key, null)); |
|
23 |
+ } |
|
24 |
+ |
|
25 |
+ /** |
|
26 |
+ * Retrieve a cookie from the request. |
|
27 |
+ * |
|
28 |
+ * @param string $key |
|
29 |
+ * @param mixed $default |
|
30 |
+ * @return string|array|null |
|
31 |
+ */ |
|
32 |
+ public static function get($key = null, $default = null) |
|
33 |
+ { |
|
34 |
+ return static::$app['request']->cookie($key, $default); |
|
35 |
+ } |
|
36 |
+ |
|
37 |
+ /** |
|
38 |
+ * Get the registered name of the component. |
|
39 |
+ * |
|
40 |
+ * @return string |
|
41 |
+ */ |
|
42 |
+ protected static function getFacadeAccessor() |
|
43 |
+ { |
|
44 |
+ return 'cookie'; |
|
45 |
+ } |
|
46 |
+} |