title: How to find entry using name in eloquent Laravel?
body: <p>By default we generally search any entry on db table by id number. But I could not find how to search any entry by the name column. </p>
  
  <p>This is my code for finding entry and rendering it to view </p>
  
  <p>Controller : Authors</p>
  
  <pre><code>class Authors_Controller extends Base_Controller {
  
      public $restful = true;
  
      public function get_view($id){
          $authorModel = Authors::find($id);
          return View::make('authors.view')
              -&gt;with('author', $authorModel)
              -&gt;with('title', $authorModel-&gt;name);
      }
  
  }
  </code></pre>
  
  <p>Model : Authors</p>
  
  <pre><code>&lt;?php 
  
  class Authors extends Eloquent {
      public static $table = 'authors';
  }
  </code></pre>
  
  <p>Route : </p>
  
  <pre><code>Route::controller(Controller::detect());
  
  Route::get('author/(:any)', array('as'=&gt;'author', 'uses'=&gt;'authors@view'));
  </code></pre>
  
  <p>View :</p>
  
  <pre><code>@layout('main.index')
  
  @section('content')
  &lt;h1&gt;{{$author-&gt;name}}&lt;/h1&gt;
  
  &lt;p&gt;
      {{$author-&gt;bio}}
  &lt;/p&gt;
  
  &lt;small&gt;
      {{$author-&gt;created_at}} |
      {{HTML::link(URL::$base.'/authors/', 'Go back')}}
  &lt;/small&gt;
  @endsection
  </code></pre>
  
  <p>How do i make the url as not to display id but to display the name of the post like</p>
  
  <blockquote>
    <p>some.com/category/name (instead of some.com/category/id)</p>
  </blockquote>