I am using the below method
private function migrate(BufferedOutput $outputLog)
{
try {
Artisan::call('migrate:fresh', $outputLog);
} catch (Exception $e) {
return $this->response($e->getMessage(), 'error', $outputLog);
}
return $this->seed($outputLog);
}
But for the first time (redirecting on PHP script to /install/database), the page does not appear, on refresh, it works as expected.

As far as I have seen your issue might be, If you use "migrate:fresh", All the tables will be dropped and
upmethods will run which creates the fresh tables. This process will take some time. So, For the first time you reload the website, The migration will be running. Since the migration is in process, You will be getting "The site can't be reached" error.To fix this, make sure to place a page displaying "Site is under development" till the migration completes. Then everything will work fine. But doing this kind of things are not suggestable.