title: React + Laravel - Response.data showing HTML
body: <p>The response.data is showing HTML code instead of JSON data</p>
  
  <p>Tried changing from string to array for the state among others</p>
  
  <p>Api.php</p>
  
  <pre><code>`Route::get('/adminUsers', 'AdminController@users');`
  </code></pre>
  
  <p>Admin Controller:</p>
  
  <pre><code>public function users(){
      $users = User::all();
      //$xx = response()-&gt; json([
  //'users' =&gt; $users,
  //]);
     //dd($xx);
      return response()-&gt;json([
     'users' =&gt; $users,
  ]);
  }
  </code></pre>
  
  <p>React.js</p>
  
  <pre><code>import React, { Component } from 'react'
  import {BrowserRouter as Router, Link, Route}     from 'react-router-dom'
  import axios from 'axios'
  class Admin extends Component {
  constructor(props) {
      super(props)    
      this.state = {
           users:  []
           // console.log(users)
      }
  }
  componentDidMount(){
      axios.get('/adminUsers')
          .then(response =&gt;{
              // this.setState({users: response.data})
              console.log(response.data)
          })
          .catch(error=&gt;{
              console.log(error)
          })
  }
  
  render() {
      const{users} = this.state  
  ...................
  </code></pre>
  
  <p>Simply get the JSON data in an array form</p>