title: Laravel - log() expects parameter 1 to be float, array given
body: <p>I am trying to print the content of a json request:</p>
  
  <pre><code>    /**
       * Store a newly created resource in storage.
       *
       * @param  \Illuminate\Http\Request  $request
       * @return \Illuminate\Http\Response
       */
      public function store(Request $request)
      {
          $data = $request-&gt;json()-&gt;all();
          return response()-&gt;json($data);
      }
  </code></pre>
  
  <p>First I tried to print the content to a file with this:</p>
  
  <pre><code>$data = $request-&gt;json()-&gt;all();
  Info($data);
  </code></pre>
  
  <p>It writes this to the log:</p>
  
  <pre><code>[2019-06-14 10:43:51] local.ERROR: log() expects parameter 1 to be float, array given {"exception":"[object] (ErrorException(code: 0): log() expects parameter 1 to be float, array given at C:\\Users\\User 1\\Coding\\data-service\\app\\Http\\Controllers\\FileController.php:39)
  [stacktrace]
  </code></pre>
  
  <p><strong>Update:</strong></p>
  
  <p>I'm using Log:debug from Jerodev's answer but it still doesn't work.</p>
  
  <pre><code>public function store(Request $request)
  {
     $data = $request-&gt;json()-&gt;all();
     //\Log::info($data);
     Log::debug($data);
     return response()-&gt;json($data);
  }
  </code></pre>
  
  <p>Log file:</p>
  
  <pre><code>local.ERROR: Class 'App\Http\Controllers\Log' not found {"exception":"[object] (Symfony\\Component\\Debug\\Exception\\FatalThrowableError(code: 0): Class 'App\\Http\\Controllers\\Log' not found at ...
  </code></pre>
  
  <p>I've included the class like this:</p>
  
  <pre><code>use App\Http\Controllers\Log;
  </code></pre>
  
  <hr>
  
  <p>Without the logging the response to the request is an empty array:</p>
  
  <pre><code>[]
  </code></pre>
  
  <p>How can I send a response this and log it?</p>
  
  <pre><code>{
    test: 123,
    debug: [...] &lt;- $data here
  }
  </code></pre>
  
  <p><strong>JSON request:</strong></p>
  
  <pre><code>{
      filename: "test1.jpeg"
  }
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/xVmcG.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xVmcG.png" alt="enter image description here"></a></p>