App.php
1 month ago
Artisan.php
1 month ago
Auth.php
1 month ago
Blade.php
1 month ago
Broadcast.php
1 month ago
Bus.php
1 month ago
Cache.php
1 month ago
Config.php
1 month ago
Cookie.php
1 month ago
Crypt.php
1 month ago
DB.php
1 month ago
Date.php
1 month ago
Event.php
1 month ago
Facade.php
1 month ago
File.php
1 month ago
Gate.php
1 month ago
Hash.php
1 month ago
Http.php
1 month ago
Lang.php
1 month ago
Log.php
1 month ago
Mail.php
1 month ago
Notification.php
1 month ago
ParallelTesting.php
1 month ago
Password.php
1 month ago
Queue.php
1 month ago
RateLimiter.php
1 month ago
Redirect.php
1 month ago
Redis.php
1 month ago
Request.php
1 month ago
Response.php
1 month ago
Route.php
1 month ago
Schema.php
1 month ago
Session.php
1 month ago
Storage.php
1 month ago
URL.php
1 month ago
Validator.php
1 month ago
View.php
1 month ago
Vite.php
1 month ago
Cookie.php
58 lines
| 1 | <?php |
| 2 | |
| 3 | namespace IAWPSCOPED\Illuminate\Support\Facades; |
| 4 | |
| 5 | /** |
| 6 | * @method static \Symfony\Component\HttpFoundation\Cookie make(string $name, string $value, int $minutes = 0, string|null $path = null, string|null $domain = null, bool|null $secure = null, bool $httpOnly = true, bool $raw = false, string|null $sameSite = null) |
| 7 | * @method static \Symfony\Component\HttpFoundation\Cookie forever(string $name, string $value, string|null $path = null, string|null $domain = null, bool|null $secure = null, bool $httpOnly = true, bool $raw = false, string|null $sameSite = null) |
| 8 | * @method static \Symfony\Component\HttpFoundation\Cookie forget(string $name, string|null $path = null, string|null $domain = null) |
| 9 | * @method static bool hasQueued(string $key, string|null $path = null) |
| 10 | * @method static \Symfony\Component\HttpFoundation\Cookie|null queued(string $key, mixed $default = null, string|null $path = null) |
| 11 | * @method static void queue(mixed ...$parameters) |
| 12 | * @method static void expire(string $name, string|null $path = null, string|null $domain = null) |
| 13 | * @method static void unqueue(string $name, string|null $path = null) |
| 14 | * @method static \Illuminate\Cookie\CookieJar setDefaultPathAndDomain(string $path, string|null $domain, bool|null $secure = false, string|null $sameSite = null) |
| 15 | * @method static \Symfony\Component\HttpFoundation\Cookie[] getQueuedCookies() |
| 16 | * @method static \Illuminate\Cookie\CookieJar flushQueuedCookies() |
| 17 | * @method static void macro(string $name, object|callable $macro) |
| 18 | * @method static void mixin(object $mixin, bool $replace = true) |
| 19 | * @method static bool hasMacro(string $name) |
| 20 | * @method static void flushMacros() |
| 21 | * |
| 22 | * @see \Illuminate\Cookie\CookieJar |
| 23 | * @internal |
| 24 | */ |
| 25 | class Cookie extends Facade |
| 26 | { |
| 27 | /** |
| 28 | * Determine if a cookie exists on the request. |
| 29 | * |
| 30 | * @param string $key |
| 31 | * @return bool |
| 32 | */ |
| 33 | public static function has($key) |
| 34 | { |
| 35 | return !\is_null(static::$app['request']->cookie($key, null)); |
| 36 | } |
| 37 | /** |
| 38 | * Retrieve a cookie from the request. |
| 39 | * |
| 40 | * @param string|null $key |
| 41 | * @param mixed $default |
| 42 | * @return string|array|null |
| 43 | */ |
| 44 | public static function get($key = null, $default = null) |
| 45 | { |
| 46 | return static::$app['request']->cookie($key, $default); |
| 47 | } |
| 48 | /** |
| 49 | * Get the registered name of the component. |
| 50 | * |
| 51 | * @return string |
| 52 | */ |
| 53 | protected static function getFacadeAccessor() |
| 54 | { |
| 55 | return 'cookie'; |
| 56 | } |
| 57 | } |
| 58 |