I am new to cakephp 3.2 I have saved data by calling model in cakephp 2X version in this way.
$this->Schools->add_school($schools);
I have used the same in 3x,but it not working showing Unknown method "add_school"
I have defined the function in model also
below is model code School.php
School.php
<?php
namespace App\Model\Entity;
use Cake\Auth\DefaultPasswordHasher;
use Cake\ORM\Entity;
class School extends Entity
{
public function add_school($schools) {
echo "hii";exit;
}
}
error is showing Unknown method "add_school" Please suggest me. Thank you in advance.