title: Create RESTAPI in laravel5.4
body: <p>I am trying to create a RESTAPI in laravel5.4. so i wrote all the code. i defined my route files in <code>api.php</code>. when i run in the postman, it's not working. then i changed my route files in <code>web.php</code>. and then i run that in postman again. then it's working. why it's not working in <code>api.php</code> file ?</p>
  
  <p>We have to define our roue files in <code>api.php</code> or <code>web.php</code> files?</p>
  
  <p>Please help me. i am just confused.</p>
  
  <p>Here is my roue file example:(api.php)</p>
  
  <pre><code>Route::get('sample-restful-apis', function()
  {
      return array(
        1 =&gt; "expertphp",
        2 =&gt; "demo"
      );
  });
  </code></pre>