title: laravel get article id
body: <p>I have an articles table and a likes table. Im trying to save the id of all the articles the user likes to return to them later on a dashboard. How do i take the id made on the articles table and add it to the likes table under article_id?</p>
  
  <pre><code>public function store()
  {
      $request = Request::all();
  
  
      $likes = new like();
      $likes -&gt;article_id = Auth::article()-&gt;id;
      $likes-&gt;user_id =   Auth::user()-&gt;id;
      $name = Auth::user()-&gt;name;
      $likes-&gt;save();
  
      return redirect('article');
  
  
  
  }
  
     $table-&gt;foreign('article_id')
              -&gt;references('id')
              -&gt;on('articles');
  </code></pre>