-
Book Overview & Buying
-
Table Of Contents
Programming with CodeIgniter MVC
By :
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 productmodel
$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 in a table, where each row has a link for ordering the product
Let us assume the URI to the project root is http://mydomain.com/myproject and http://mydomain.com/myproject/order.
The source code is provided with this book via URLs.
Change the font size
Change margin width
Change background colour