Join Jon Peck for an in-depth discussion in this video Viewing and deleting magazines, part of Learning PHP CodeIgniter (2013).
I've been making solid progress but it's time to focus, and put some final touches…on this application. There's two major pieces missing.…The ability to view magazines, and delete an individual magazine.…In some ways, the two pieces of functionality are very similar.…In that they both require something to get an issue_id then some kind of action on a…loaded model. I'm going to start by adding links to view…and delete from the magazine list. Edit the magazine controller and at the…top of the index function add a load helper to load the URL helper.…
This load, helper, URL. It would be helpful to see whether a…magazine has a cover associated with it. So at the end of the 4H loop lets add a…column with a simple Y or N if there is a cover Issue issue_cover switch yes or no.…I'm going to use the anchor helper function to generate links based on the…local URL as a final column in the magaine table.…I'll make links to both view and edit. The first argument f anchor is the path…which will be magazine/view. And then I'm going to pass it the issue.…
Starting with the what and why of CodeIgniter, Jon introduces key concepts such as the MVC pattern and libraries by demonstrating how to create static pages, then storing and displaying magazine info in a database. Advanced topics like classes and helpers are explored to validate user input, upload files, and much more. By creating a complete system, you'll have the foundation to build your own applications with CodeIgniter.
- What is CodeIgniter?
- Creating a static page controller
- Generating output with a view
- What is a model?
- Saving data with Active Records
- Creating forms
- Validating user input
- Listing records in tables
- Uploading images
- Viewing and deleting records