Hello @kartik,
You can use the URL facade which lets you do calls to the URL generator
So you can do:
URL::to('/');
You can also use the application container:
$app->make('url')->to('/');
$app['url']->to('/');
App::make('url')->to('/');
Hope it helps!!
Thank YoU!!