title: Seeing only the app version with Lumen POST API call
body: <p>I am new to Lumen. I started using Lumen on MAC OS and running it inside a docker container.</p>
  
  <p>The <strong>app</strong> service in the dockerfile is as follows:</p>
  
  <pre><code>app:
  build:
    context: ./
    dockerfile: app.dockerfile
  working_dir: /var/www
  volumes:
    - ./:/var/www
  environment:
    - "DB_PORT=3306"
    - "DB_HOST=database"
  </code></pre>
  
  <p>The mysql service is running perfectly as well. On opening <a href="http://localhost:9002" rel="nofollow noreferrer">http://localhost:9002</a> I can see the normal Lumen app versioning:</p>
  
  <pre><code>Lumen (5.4.6) (Laravel Components 5.4.*)
  </code></pre>
  
  <p>Now I have made an API end-point for simple sms to be acknowledged. The user should send from and to phone numbers and I just validate them against the data present in the db and return the result .</p>
  
  <p>My <strong>routes.php</strong> reads:</p>
  
  <pre><code>$app-&gt;post('/outbound/sms', 'App\Http\Controllers\SmsController@sendSms');
  </code></pre>
  
  <p>My <strong>SmsController</strong> is present under App\Http\Controllers as well. It uses a PhoneNumber Model as below:</p>
  
  <pre><code>use Illuminate\Http\Request;
  use App\Http\Controllers\Controller;
  use App\PhoneNumber;
  use Illuminate\Support\Facades\App;
  
  public function sendSms(Request $request)
  {
  
          try
          {
              $fromModel = PhoneNumber::findOrFail($request-&gt;input('from'));
          }
          catch(ModelNotFoundException $e)
          {
              return response()-&gt;json(['message'=&gt; '', 'error'=&gt; 'from is not found']);
          }
  
          try
          {
              $toModel = PhoneNumber::findOrFail($request-&gt;input('to'));
          }
          catch(ModelNotFoundException $e)
          {
              return response()-&gt;json(['message'=&gt; '', 'error'=&gt; 'to is not found']);
          }
  
          $this-&gt;validateSms($_REQUEST);
  
          return response()-&gt;json(['message'=&gt; 'inbound sms ok', 'error'=&gt; '']);
  }
  </code></pre>
  
  <p>My <strong>.htaccess</strong> file reads: </p>
  
  <pre><code>&lt;IfModule mod_rewrite.c&gt;
      &lt;IfModule mod_negotiation.c&gt;
          Options -MultiViews
      &lt;/IfModule&gt;
  
      Options +FollowSymLinks
      RewriteEngine On
  
      # Redirect Trailing Slashes If Not A Folder...
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteRule ^(.*)/$ /$1 [L,R=301]
  
      # Handle Front Controller...
      RewriteCond %{REQUEST_FILENAME} !-d
      RewriteCond %{REQUEST_FILENAME} !-f
      RewriteRule ^ index.php [L]
  
      # Handle Authorization Header
      RewriteCond %{HTTP:Authorization} .
      RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  
  &lt;/IfModule&gt;
  </code></pre>
  
  <p>On making a POST API call from Postman , </p>
  
  <pre><code>http://localhost:9002/outbound/sms?from=1234567890&amp;to=3456789&amp;text=hi
  </code></pre>
  
  <p>I always get the app version as the response:</p>
  
  <pre><code>Lumen (5.4.6) (Laravel Components 5.4.*)
  </code></pre>
  
  <p>Even appending index.php to the url doesn't work. 
  Can't make out what's wrong? </p>
  
  <p><strong>Update:</strong>
  Finally , I got routes working fine. My routes.php content should have been in routes/web.php instead of App\Http.</p>
  
  <p>Nut now I am getting NotFoundHttpException. Below is the stack trace::</p>
  
  <pre><code>in RoutesRequests.php (line 594)
  at Application-&gt;handleDispatcherResponse(array(0))
  
  in RoutesRequests.php (line 532)
  at Application-&gt;Laravel\Lumen\Concerns\{closure}()
  
  in RoutesRequests.php (line 781)
  at Application-&gt;sendThroughPipeline(array(), object(Closure))
  
  in RoutesRequests.php (line 534)
  at Application-&gt;dispatch(object(Request))
  
  in RoutesRequests.php (line 475)
  at Application-&gt;run(object(Request))
  
  in index.php (line 29)
  </code></pre>