title: Laravel 5.5 Trying to get property 'id' of non-object
body: <p>I'm new on Laravel.I used Laravel version 5.5</p>
  
  <p>If I try to login with postman.I got "Trying to get property 'id' of non-object" error.And error line is </p>
  
  <pre><code>    private $client;
  
  public function __construct(){
      $this-&gt;client = Client::find(1);
  }
  
  public function login(Request $request){
  
      $this-&gt;validate($request, [
          'username' =&gt; 'required',
          'password' =&gt; 'required'
      ]);
  
      return $this-&gt;issueToken($request, 'password'); // this line has error
  
  }
  </code></pre>
  
  <p>issueToken Function</p>
  
  <pre><code>public function issueToken(Request $request, $grantType, $scope = ""){
  
      $params = [
          'grant_type' =&gt; $grantType,
          'client_id' =&gt; $this-&gt;client-&gt;id,
          'client_secret' =&gt; $this-&gt;client-&gt;secret,           
          'scope' =&gt; $scope
      ];
  
      if($grantType !== 'social'){
          $params['username'] = $request-&gt;username ?: $request-&gt;email;
      }
  
      $request-&gt;request-&gt;add($params);
  
      $proxy = Request::create('oauth/token', 'POST');
  
      return Route::dispatch($proxy);
  
  }
  </code></pre>
  
  <p>I got same error on Register.But my user successfully registered with 500 error (Trying to get property 'id' of non-object) </p>