Hi,
How is it possible to get data from two table and display it in a view, I have customer and admin_user table, an admin user have created customer and admin user id saved into customer table but now problem is how can I show admin user name in view?
here is my code:
Controller:
public function index($f3){
$f3->set("DEBUG",3);
$customer = new \Model\Customer;
list($filter, $filter_str) = $this->_buildFilter();
$customers = $customer->paginate($args["page"], 50, $filter_str); $f3->set("data", $customers);
}Model
class Customer extends \Model {
protected $_table_name = "customer";
public static function create(array $data){
try{
return parent::create($data);
}catch(Exception $e){ throw $e; }
}
}