I made a migration script in cakephp and ran the script using the command "bin/cake migrations migrate"
my code in the up() function:
$preparedArray=[
'name'=>'dhruv',
'surname'=>'sharma'
];
$table = $this->table('name');
$table->insert($preparedArray);
$table->saveData();
when I run the command, i get a fatal error:- "uncaught type error Argument 1 passed to Cake\Console\ConsoleErrorHandler::handleException() must be an instance of Exception, instance of Err or given in C:-- Projects --\myproject\vendor\cakephp\cakephp\src\Console\ ConsoleErrorHandler.php:64"
I am using cakePHP 3.0.6 and php 7.0.4
Kindly help