Return view as string in laravel

{ // deep_execution_view
const authorName = "Ankit Agrawal";
//
const publishDate = "July 13, 2019";

For this we have to call render function in laravel. please use following code

 $aString = view("VIew Path")->render(); 


}