In this example, we will demonstrate business logic. Ordering a product will trigger the model to update the product's quantity and check whether it's smaller than a certain amount.
This example will be constructed from the following controllers, model, and view:
application/controllers/order.php: This controller loads the model
$this->load->model(' productmodel'): This controller renders the view
orderview, which displays all the products, and where each product has links to ordering a product
application/models/productmodel.php: This model contains functions, which retrieve products, updates its quantity, and checks its quantity
application/views/ orderview.php: The view displays all the products ...