title: How to link to a restful Resource within a Blade template in Laravel?
body: <p>I'm trying to figure out the "Laravel" way of referring to a resource link from within a blade template.</p>
  
  <p>The context is a CRUD Admin Panel I'm building. The URLs are as follows:</p>
  
  <pre><code>"list" camera resources:
    /admin/cameras
  
  "show" a camera resource:
    /admin/cameras/12
  </code></pre>
  
  <p>These are working fine.</p>
  
  <p>My routes.php:</p>
  
  <pre><code>Route::resource('admin/cameras', 'MyAdmin\\Controllers\\CamerasController');
  </code></pre>
  
  <p>In the template for the "list" action, I'm trying to add a link on each row to go to the "show" action for that resource. My current working code in views/cameras/index.blade.php:</p>
  
  <pre><code>&lt;span&gt;{{ link_to('/admin/cameras/'.$r['id'], $v); }}&lt;/span&gt;
  </code></pre>
  
  <p>...where $r is the 'iterator' from the enclosing loop. Naturally this generates a url like the "show" above.</p>
  
  <p>It seems a cleaner way would be to use link_to_route or link_to_action, but I haven't had much luck with either. Based on what I've read so far it doesn't seem possible to setup a named route on a resource. Is the code above optimal or does Laravel have something more elegant to offer here?</p>
  
  <p>NOTE: I've seen some similar questions, but mine is specific to 'resource' routes.</p>