title: Send http request to laravel API from android emulator
body: <p>I'm creating an android app and want to send http requests to my local website which I'm hosting using laragon.</p>
  
  <p>I'm using laragon and when i run the command</p>
  
  <pre><code>composer create-project laravel/laravel myproject --prefer-dist
  </code></pre>
  
  <p>the project is created in "C:\laragon\www" in a folder myproject. I can access the page with "myproject.test" locally. </p>
  
  <p>Now I'm unclear on where to send the http request to. I can access the localhost from my android emulator with 10.0.2.2 and when i do "10.0.2.2/myproject" I can see the folder hierarchie from my project. I have a controller called "UserController.php" </p>
  
  <pre><code> class UserController extends Controller
   {
      public function getUsername() {
      return view('user', ['username' =&gt; 'bob');
      }
  }
  </code></pre>
  
  <p>and a route</p>
  
  <pre><code> Route::get('/user', 'UserController@getUsername');
  </code></pre>
  
  <p>Now i would like to to "10.0.2.2/myproject/user" to get the username but this doesn't work. I'm guessing there is a whole new feature or laravel i don't know about to handle http requests from the outside.</p>
  
  <p>So in short:
  I'm trying to create a API to which i can send http requests which retrieve data (from a DB) from my emulator. </p>
  
  <p>I hope this is enough info to work with!</p>