I have simple function in one of my controller (members):
function action_data($array) {
$datamembre = DB::table('members')->where('id', '=', $id)->first();
return $datamembre;
}
I want use it in the view of another controller, I do this in my template:
$datamembers = Controller::call('members@data', array($members_id));
Is there any better or proper way to do it?