title: Use axios with Vue and Laravel for post request
body: <p>I'm trying to see Laravel + Vue but I have a problem on the vista side.
  How can I send the data correctly through axios?
  Look how I did it.</p>
  <pre><code> &lt;button onClick=&quot;addVote(question.id)&quot;&gt;Vote&lt;/button&gt;
  data() {
              return {
                questions:[],
                percentages:[],
                vote:''
              }
          },
          methods: {
              getQuestions(){
                  axios.get('/questionlist')
                      .then((response)=&gt;{
                         this.questions = response.data.question
                      })
              },
              getPercentages(){
                  axios.get('/getpercentage')
                      .then((response)=&gt;{
                         this.percentages = response.data.percentage
                      })
              },
              addVote(id) {
                  axios.post(`/vote/${id}`, data);
              }
          },
          created() {
              this.getQuestions(),
              this.getPercentages(),
              this.addVote()
          }
  </code></pre>
  <p>These are the methods in view to receive the data and send the data.
  The last one is the voting method with which I want to send a request to the server and be able to add a + to each vote.</p>
  <p>This is also the Controller</p>
  <pre><code> public function vote($id) {
          $question = Question::find($id);
          if(Auth::user()-&gt;votes == 0) {
              $question-&gt;increment('votes', 1);
              $question-&gt;increment('totalvotes', 1);
              Auth::user()-&gt;update([
                  'votes' =&gt; '1'
              ]);
              Alert::success(&quot;Success&quot;, 'Your vote has been added');
          }
          return response()-&gt;json($question);
      }
  Route::POST('/vote/{id}',          'QuestionController@vote');
  </code></pre>
  <p>My question is, what am I not doing right in these situations?</p>