[eluser]Unknown[/eluser]
I’m kind of new to this framework.
Can I know how do I make a proper shared block that contains pulled data from the database?
For example a “Featured product block” where I can located in different pages?
Product Controller
Code:
public function featured_product_block(){
$product_array = $this->product_model->get_product();
$data["products"] = $product_array;
$this->load->view("blocks/product_block", $data);
}
So do I just call this controller from another controller? Or is there another way to do it?