Skip to content

Commit 2e20164

Browse files
authored
[11.x] Give session ID retrieval the Laravel treatment (#51732)
* Adds id method to session * Update facade
1 parent 04cfdb4 commit 2e20164

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

src/Illuminate/Session/Store.php

+10
Original file line numberDiff line numberDiff line change
@@ -643,6 +643,16 @@ public function setName($name)
643643
$this->name = $name;
644644
}
645645

646+
/**
647+
* Get the current session ID.
648+
*
649+
* @return string
650+
*/
651+
public function id()
652+
{
653+
return $this->getId();
654+
}
655+
646656
/**
647657
* Get the current session ID.
648658
*

src/Illuminate/Support/Facades/Session.php

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
* @method static bool isStarted()
5151
* @method static string getName()
5252
* @method static void setName(string $name)
53+
* @method static string id()
5354
* @method static string getId()
5455
* @method static void setId(string|null $id)
5556
* @method static bool isValidId(string|null $id)

0 commit comments

Comments
 (0)