How can I make this controller DRY? |
I have been working on an online newspaper/blogging application with CodeIgniter 3.1.8 and Twitter Bootstrap 4. I am currently working on a lazy loading (of posts) feature.
I have added a pager option for the posts, to replace the pagination, if desired. The code in the controller responsible for this is: PHP Code: if ($this->Static_model->get_static_data()['has_pager']) { What is the most effective and DRY way to "externalize" the pager functionality (and the code above) and call it with a small piece of code, where it is nedded? |
Messages In This Thread |
How can I make this controller DRY? - by Ajax30 - 01-30-2022, 01:09 PM
RE: How can I make this controller DRY? - by sammyskills - 01-31-2022, 04:52 AM
|