Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 235d729 commit 0247932Copy full SHA for 0247932
1 file changed
src/Illuminate/Auth/Guard.php
@@ -148,6 +148,25 @@ public function user()
148
149
return $this->user = $user;
150
}
151
+
152
+ /**
153
+ * Get the currently user id.
154
+ *
155
+ * @return int|null
156
+ */
157
+ public function id()
158
+ {
159
+ if ($this->loggedOut) return;
160
161
+ $id = $this->session->get($this->getName());
162
163
+ if (!$id)
164
165
+ $id = $this->getRecaller();
166
+ }
167
168
+ return $id;
169
170
171
/**
172
* Pull a user from the repository by its recaller ID.
0 commit comments