title: Laravel routes don't work with slugs
body: <p>route() function doesn't generate url with slug</p>
  
  <p>routes/web.php</p>
  
  <pre><code>Route::get('/tasks/{task}', 'TasksController@show')-&gt;name('task.show');
  </code></pre>
  
  <p>Tasks model</p>
  
  <pre><code>public function getRouteKeyName()
  {
      return 'slug';
  }
  </code></pre>
  
  <p>Tasks Controller</p>
  
  <pre><code>public function show(Tasks $task){
      $task_full = Tasks::with('tags')-&gt;find($task-&gt;id);
      return view('tasks.show', ['task'=&gt;$task_full]);
  }
  </code></pre>
  
  <p>Finally route() function in my view that works the way I didn't expect. It generates url like this - laravel.test/tasks/3. 
  And I want it to use slugs. </p>
  
  <pre><code>&lt;a href="{{route('task.show', ['task'=&gt;$task])}}"&gt;&lt;li&gt;{{$task-&gt;body}}&lt;/li&gt;&lt;/a&gt;
  </code></pre>