title: In Route.php line 817:Unable to prepare route [api/user] for serialization. Uses Closure
body: <p>I cleared every instance of a closure from my web.php file but i'm still getting this error when I run php artisan route:cache.How do I fix this.</p>
  
  <p>The format of the routes that I used are:</p>
  
  <pre><code>Route::get('/home',[
  
        'uses'=&gt;'HomeController@index',
  
  ])-&gt;name('home');
  </code></pre>
  
  <p>and the other format is</p>
  
  <pre><code>Route::get('/profile',[
  
        'uses'=&gt;'profileController@index',
  
  ]);
  </code></pre>
  
  <p><strong>Edit:</strong> Formatted code</p>