Phinx is nice tool to database migration and it is working fine with terminal creating tables and seeding data into it by commands, but I want to see some output on the browser from this code before inserting into the tables can anyone help me out how to put some var_dumps in in and see output on terminal or in the browser somehow?
Example Code:
public function up()
{
$userLinks = $this->fetchAll('SELECT * FROM user_links');
var_dump($userLinks);
foreach ($userLinks as $userLink) {
$actionPlugin = ucfirst($userLink['action']);
$actionParams = array();
$actionParams['UserID'] = $userLink['userID'];
if (isset($userLink['userSurveyID'])) {
$actionParams['UserSurveyID'] = $userLink['userSurveyID'];
}
$jsonParamString = json_encode($actionParams);
$this->execute("
INSERT INTO `token_links` (`linkID`, `token`, `actionPlugin`, `actionParams`) VALUES
({$userLink['userLinkID']}, '{$userLink['token']}', '$actionPlugin', '$jsonParamString');
");
}
}