Use route based URL generation

https://www.drupal.org/node/2346779 deprecated url() method and it's recommended to use route based Url generation instead.