Reputation: 6085
Hi friends hi have this function in one controller , how can i access it from every other controller ?pls help
public function click_add($ads_id){
//some statement here
redirect($ads_site['url']);
}
Upvotes: 2
Views: 771
Reputation: 19738
There are a few possibilities:
It all depends on what exactly the function should do. If it shouldn't access the model, then you could go for the first three options. Otherwise I'd suggest the latter two.
Upvotes: 3