title: I want to send session data into blade in laravel
body: <p>I am trying to make a user profile with laravel! I can set the session I can see the data into the controller but now I want to compact the data for the profile blade. </p>
  
  <pre><code>public function profile(Request $request)
  {
   $validatedData = $request-&gt;validate([
                    'email' =&gt; 'required|email',
                    'password' =&gt; 'required',
  ]);
  
   $user = DB::table('user_registers')
         -&gt;where('email',$request-&gt;input('email'))
         -&gt;first();
  
        if (!empty($user-&gt;email)) {
         if(Hash::check($request-&gt;password, $user-&gt;password))
         {
           $request-&gt;session()-&gt;put('data',$request-&gt;input('email'));
           if ($request-&gt;session()-&gt;has('data')) {
             return view('fontend.index')-&gt;with('data', $request-&gt;input('email'));
           }
         }else{
           return back()-&gt;with('password','Incorrect Password!');
         }
       }else {
         return back() -&gt;with('email','Please Insert a valid email');
       }
  
      }
  </code></pre>