title: Show individual record on pop up Laravel
body: <p>I am using a resource controller. All records are displayed on the dashboard. From here, I am trying to show an individual record after I click the show button.</p>
  <p>The data is displayed on the pop up but it is the wrong one.</p>
  <p>How can I solve this issue?</p>
  <p><strong>DashboardController.php</strong></p>
  <pre><code> public function index()
      {
          $frontend = Frontend::orderBy('created_at', 'desc')-&gt;paginate(10);
          return view ('dashboard')-&gt;with('frontends',$frontend);
      }
  </code></pre>
  <p><strong>dashboard.blade.php</strong></p>
  <pre><code> &lt;button type=&quot;submit&quot; class=&quot;btn btn-secondary&quot; onclick=&quot;showReviewModal()&quot;&gt;
            &lt;i class=&quot;fas fa-eye&quot;&gt;&lt;/i&gt;
   &lt;/button&gt;
  
   &lt;div id=&quot;modalReview&quot;
          class=&quot;fixed overflow-x-hidden overflow-y-auto inset-0 flex justify-center items-center z-50 p-6&quot;
          style=&quot;display: none;&quot;&gt;
          &lt;div class=&quot;relative mx-auto w-auto max-w-2xl&quot;&gt;
              &lt;div class=&quot;bg-white w-full p-12 rounded-lg text-xl&quot;&gt;
                  &lt;span&gt;&lt;strong&gt;Review&lt;/strong&gt;&lt;/span&gt;
                  &lt;br /&gt;
  
                  @if (count($frontends))
                      &lt;p class=&quot;mt-6 text-justify&quot;&gt;{{ $frontend-&gt;review }}&lt;/p&gt;
                  @endif
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  <p><strong>script.js</strong></p>
  <pre><code>function showReviewModal() {
      $(&quot;#modalReview&quot;).show();
      $(&quot;#modalShadow&quot;).show();
      
  }
  </code></pre>