Controllers are basically the cornerstone of our application. But what is an application without data? So let's load views and pass data through the controller.
- [Instructor] Now that we have…our copy of CodeIgniter up and running,…let's get coding, and start with the magic.…I'm going to go ahead and open…the exercise files for 01_02.…Open, Desktop, Exercise Files,…Chapter one, 01_02_start, Open.…I'm also going to start the server,…so we're going to go cd Desktop, ExerciseFiles,…01, 01_02_start.…And we're going to type php -s localhost:8080.…
Now, let's get coding, and start with the magic.…One of the most common tasks we are going to do…while developing an application,…is to load the HTML that the user will end up…seeing rendered in the browser.…We could just print out the HTML as a string…in the controller, but that's not maintainable,…and it goes against the whole idea of the MVC paradigm.…CodeIgniter comes with a loading mechanism…to insert several types of resources,…be it models, views, libraries, et cetera.…In this case, we'll be using it to load an HTML file.…
Let's open up controllers, and Properties.php.…Our controller will be the first to acknowledge…a request on a page, so let's add a new method called index.…
- Loading views and data from containers
- Routing with controllers
- Creating models
- Configuring the data
- Working with data, forms, sessions, and headers
- Logging and error logging
- Extending CodeIgniter to consume dependencies
Skill Level Beginner
PHP: Clean URLs on Apache Serverwith David Powers1h 36m Intermediate
PHP: Managing Persistent Sessionswith David Powers2h 41m Intermediate
1. Get Started with CodeIgniter
2. Work with Data, Logs, Forms, and Headers
3. Take CodeIgniter Further
CodeIgniter and Composer3m 13s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.