title: Attempt to assign property of non-object in laravel
body: <p>I get this error with this code </p>
  
  <p>in my MediaController.php: </p>
  
  <pre><code>public function editMediaGuide($mediaItem)
  {
      //ipv aparte pagina gwn de pagina echo'en (niet zeker of dit mag)
      $media = DB::table('tblMedia')-&gt;where('PK_media_id', $mediaItem)-&gt;get();
  
      echo $media-&gt;title;
   }
  </code></pre>
  
  <p>in routes.php : </p>
  
  <pre><code>Route::get('/guide/dashboard/media/edit/{mediaItem}', array('as' =&gt; 'guide-media-edit', 'uses' =&gt; 'MediaController@editMediaGuide'));
  </code></pre>
  
  <p>in my view where I click a specific item (this is giving the right PK_media_id)  : </p>
  
  <pre><code>&lt;a href="{{ URL::route('guide-media-edit', $media-&gt;PK_media_id) }}" &gt;
  </code></pre>