In this video, we are adding a link with the help of the .links.menu.yml file, in our custom Drupal 8 module.
If you liked this video, please also have a look at my new course about Drupal 8 module development here (with 50% discount):
https://goo.gl/LPyeDw
We are going to be quickly creating a very simple controller with a route. Afterward, we are going to implement the .links.menu.yml in order to add a menu link to our page right after the module is installed.
The full code of the module you may find here
https://github.com/drupal-up/drupalup_links
Here is a very good example with some explanations from drupal.org https://www.drupal.org/docs/8/api/menu-api/providing-module-defined-menu-links
Here is some documentation on values that could be used in our .links.menu.yml file
https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Menu%21menu.api.php/function/hook_menu_links_discovered_alter/8.2.x
More videos and stuff you may find on https://drupal-up.com
To support us please, don't forget to share, subscribe, like and comment on the video!