It return null value when i am trying to get user id
<p>I am trying to get a logged in user data like id, name, email etc. I have to compare this id with another table called adminpictures and then display this picture if any record found against this id. </p>

<p>here is my code for getting user id</p>

<pre><code>$id = Auth::id();
        dd($id);
</code></pre>

<p>but it return null, i want logged in user id. How i can do that. 
I am new in laravel </p>