Dynamic menu from database Yii2

Hello, can someone show me, how I can create controller to dynamic menu from database?

When I will add next category to database, I would like automatic get this page in controller.

Now i must:


Class Menucontroller  extends Controller

{

   public function actionFamilly()

{

  return $this->render('familly');

}


   public function actionAction()

{

  return   $this->render('Action');

}

}

etc