title: Add header token to axios requests after login action in vuex
body: <p>after building login system with laravel pasport i want to Add header token to axios requests 
  but axios.defaults.headers.common["Authorization"]= "Barearnull"   any help!!! What am I doing wrong?
  this the code in ProjectEmploye.vue :</p>
  
  <pre><code>created(){
    axios.defaults.headers.common["Authorization"] = "Bearer" + 
     localStorage.getItem("member_token");
    this.$store.dispatch('currentUser/getUser');
   }
  computed:{
    currentUser:{
          get(){
  return    this.$store.dispatch('currentUser/getUser');
    }
    }
  
   },
  </code></pre>
  
  <p>and this is CurrentUser.js:</p>
  
  <pre><code>import axios from "axios";
  
   const state ={
   user:{
  
   }
  
   };
   const getters= {};
    const actions = {
   getUser(){
      axios.post("api/userauth")
      .then(response=&gt;{
    commit('setUser',response.data);
      });
   },
  loginUser({},user){
     axios.post("/api/login",{
         email: user.email,
  
         password: user.password
     })
     .then(response=&gt;{
         console.log(response.data);
        if( response.data.acces_token){
             //save token mte3na fi locoal storage
             localStorage.setItem(
                 "membre_token",
                 response.data.acces_token
             )
  
             window.location.replace("/home");
         }
  
     })
     }
  };
  const mutations={
  setUser(state,data){
      state.user=data;
  }
  };
  
  export default{
  namespaced:true,
   state,
   getters,
   actions,
  mutations
  }
  </code></pre>