title: how to get data from DB using axios
body: <p>I’m having a problem.</p>
  
  <p>i have list of project i want when i click in one project he take me to another page(components) this is the component ProjectDetail when i can find the detail of that project  Inside of it, I have this block of code:
  this is the route who take me to another components:</p>
  
  <pre><code> {path: '/detail/:id', name: detail , component: detail },
  </code></pre>
  
  <p>I want to get the project with the id in the url detail from DB w but nothing Happen this is ProjectDetail.vue:</p>
  
  <pre><code>export default {
        data(){
        return{
        id: this.$route.params.id,
      projets:[],
     projet:{
      id:'',
     name:'',
       durre:'',
    description:'',
        budget:'',
    owner:'',
        }
     }
   },
        methods:{ 
      afficherProjets(){
         axios.get('api/getProjects/'+this.id)
           .then(data =&gt; {
             this.projets = data.data;
                 });
                    }
             },
            mounted() {
             console.log('Component mounted.')
             this.afficherProjets();
          }
             }
  </code></pre>
  
  <p>and this is my controller:</p>
  
  <pre><code> public function getProjects($id)
  {
     return Projet::findOrFail($id);
  }
  </code></pre>