Im creating a plugin and using the star-rating plugin as a base. But i dont know how to make a route to my ajax requests. Example: on star rating they have this line:
'uri' => Uri::addNonce($this->grav['base_url'] . $this->config->get('plugins.star-ratings.callback') . '.json','star-ratings')
who return something like localhost/star-ratings.json and the javascript make a post on this url and works fine, but when i change to my plugin name doesnt work, ex: localhost/plugin-name.json do i have to create this url in some file?