I have this Vuejs Code:
axios.get('/api/electronic_collection?page='+this.currentPage+'&api_token='+App.apiToken)
.then(response => {
this.posts = response.data.data.data;
this.total = response.data.data.last_page;
this.currentPage = response.data.data.current_page;
this.rowsQuantity = response.data.data.total;
});
How you can see I am seding the api_token because it connects to an API Restful but what I want to do it's that I need to get this api_token in the controller.
My controller is like this:
public function index(Request $request)
{
but I'd like to get the api_token here, how can I do that I mean $_GET['api_token'] is it like this?
}