i want to call a php variable into a twig file.
suppose in my function i am getting "$usrname", so how can i return the value in the twig file ---
public function helloTestAction(){
$usrname = $user->getUserDetails()->get()->getLatestName();
// UserDetails is the entity class name
.........
}
Suppose i get the answer "Hello Test", so now how can i return this value into my twig file.
So how can i get the "$usrname" in my twig file.
Anyone knows any solution for this problem. Thanks in advanced.