title: Injecting object into controller throw an error
body: <p>I have a project in laravel with a model called Teacher.</p>
  
  <p>I have model file , controller with this code.</p>
  
  <pre><code>/**
    * @param Teacher $Teacher
    * @return \App\Http\Resources\Teacher
    */
  public function show(Teacher $Teacher) : \App\Http\Resources\Teacher
  {
      return new \App\Http\Resources\Teacher($Teacher);
  }
  </code></pre>
  
  <p>In route file i have this code</p>
  
  <pre><code>$prefix = '/api/v2/teachers';
  
  $router-&gt;group([
     'prefix' =&gt; $prefix,
     'namespace' =&gt; 'CarApp',
  ], function () use ($router) {
  
  $router-&gt;get('/{Teacher}', 'TeacherController@show');
  $router-&gt;get('/', 'TeacherController@list');
  </code></pre>
  
  <p>});</p>
  
  <p>This is the error that i'm receiving when i'm doing get like this.</p>
  
  <p><a href="http://project.local/api/v2/teachers/1" rel="nofollow noreferrer">http://project.local/api/v2/teachers/1</a></p>
  
  <blockquote>
    <p>{ "errors": { "type":
    "Symfony\Component\Debug\Exception\FatalThrowableError",
    "message": "Argument 1 passed to
    App\Http\Controllers\CarApp\TeacherController::show() must be an
    instance of App\CoursesApp\Teacher, string given", "code": 500 } }</p>
  </blockquote>