title: Handling Json Request in php sent by alamofire
body: <p>I want to call my php function using alamofire and pass a json object as a parameter than handle the request inside the php function and write the data to the table.</p>
  
  <p>Im using: Swift, php with laravel framework. </p>
  
  <p>and what I've done so far is the following:</p>
  
  <p>IN SWIFT</p>
  
  <pre><code>   let jsonObject: Parameters = ["isValid":true];
  
      Alamofire.request("http://localhost/flare/public/MyJson", method: .post, parameters: jsonObject, encoding: JSONEncoding.default)
  </code></pre>
  
  <p>IN PHP</p>
  
  <pre><code>public function HandleJson($isValid){
  
      $data = json_decode($isValid);
  
      DB::table('FakeTable')-&gt;insert([
          'FK_ISTRUE' =&gt; $data["isValid"]]);
  }
  </code></pre>
  
  <p>but It fails and since I don't have the opportunity to debug I can't figure out what to do.. any help is appreciated and excuse my bad english.</p>