Codeigniter 4: Build A Complete Web Application From Scratch
Last updated 2/2022
MP4 | Video: h264, 1280x720 | Audio: AAC, 44.1 KHz
Language: English | Size: 1.96 GB | Duration: 10h 3m
Last updated 2/2022
MP4 | Video: h264, 1280x720 | Audio: AAC, 44.1 KHz
Language: English | Size: 1.96 GB | Duration: 10h 3m
Learn how to build fully-featured web applications with the most popular lightweight PHP MVC framework
What you'll learn
How to install and configure CodeIgniter locally
How an MVC framework like CodeIgniter differs from "plain" PHP
Create, Read, Update, Delete (CRUD) for database records
User registration with account activation by email
Login with remember me, and requiring login to access content
User-initiated password reset by email
Uploading and processing images
Handling Ajax requests and returning JSON
Styling using a CSS framework
Internationalization: displaying content in more than one language
Securely deploying an application to shared hosting
Support directly from the instructor: any question asked in the Q&A section will always get a response
Requirements
You need to know PHP, including the basics of classes and objects, and how to work with a database
Ideally have a web server with PHP and Composer installed, but a brief overview of installing these will be covered
Be happy to install software and run basic commands on the command line
Description
CodeIgniter 4 is a modern, fast, lightweight, PHP MVC framework that allows you to build secure applications quickly and easily. It's simple to install and use, and works well on shared hosting. CodeIgniter provides a rich set of libraries for common tasks, which lets you focus on your project by minimizing the amount of code you need to write.Learn how to develop PHP applications with CodeIgniter in this Comprehensive Course.How to quickly install and configure the frameworkLearn how to separate presentation code from application codeHow to do CRUD (create, read, update, delete) operationsSignup: User account registrationAuthentication: login with remember meUser administration with administrator usersAccount activation by emailUser-initiated password resetFile uploads and image processingAjax requests and JSONStyling using a CSS frameworkInternationalization: displaying content in more than one languageDeployment: installing the application on shared hostingThe essential skills required to develop applications quickly using CodeIgniter.Developing PHP web applications is faster if you use a framework. There are many available frameworks, but some require a lot of configuration to get started, and need a powerful server to run. CodeIgniter is a lightweight but powerful framework, that's easy to install, and works well on shared hosting. On this course, we'll start from scratch, starting with installing the framework, through developing a complete web application, to ultimately installing it on a live server.Content and OverviewThis course is designed for the PHP developer who wants to learn the CodeIgniter framework in depth. I designed the course to be easily understood by PHP developers who have no previous experience of a framework, and who want to develop full, feature-rich applications quickly and easily. Learning the techniques on this course will enable you to write web applications using CodeIgniter faster than you would be able to do in plain PHP.Suitable for all PHP developers, you'll start by learning the basics of the CodeIgniter framework.You'll learn how the framework is organised, and how to work efficiently with it.We'll build a full web application from scratch, with each concept explained in detail at every stage.Throughout the course, we'll build code that you can reuse in all your projects.All the source code developed in the lectures is available to download.All the time we'll adhere to industry standards and best practices.When you complete the course you'll be able to use CodeIgniter to create fast, flexible web applications, with all the features a modern web application requires.Complete with all the code shown in the lectures, you'll be able to work alongside the instructor and will receive a verifiable certificate of completion upon finishing the course.Also, at all times throughout the course you have access to the instructor in the Q&A section to ask for help with any topic related to the course.Enrol now and become a master of the most popular lightweight PHP MVC framework!
Overview
Section 1: Introduction and project setup
Lecture 1 Introduction and welcome: how to get the most out of the course
Lecture 2 Install a web server with PHP, database server and phpMyAdmin
Lecture 3 Create an empty database in the local database server
Lecture 4 Install the CodeIgniter framework, optionally using Composer
Lecture 5 Configure the framework to display error messages
Lecture 6 Configure the web server to access the framework using a virtual host
Lecture 7 Common installation / configuration issues and their solutions
Section 2: CodeIgniter and MVC basics: controllers, views and layouts
Lecture 8 MVC basics: how a framework is different to plain PHP
Lecture 9 View basics: create and display the homepage
Lecture 10 Routing: how CodeIgniter decides which controller and method to run
Lecture 11 Add another controller and view to display a list of tasks
Lecture 12 Showing multiple views: two techniques for reducing code repetition
Lecture 13 View layouts: use a base layout for common view code
Lecture 14 Add a section for the title and use the layout in the task index
Section 3: Database data: models, configuration and migrations
Lecture 15 Displaying dynamic data: pass data from a controller to a view
Lecture 16 Configure the framework to connect to the database
Lecture 17 Database migrations: create the task table in the database
Lecture 18 Migrations without the command line: add columns using a controller
Lecture 19 Models: connect to the database and select data automatically
Lecture 20 Debugging tools: enable the debug bar and use the dd function
Section 4: CRUD Part 1: Displaying and inserting new data
Lecture 21 Add a page to show an individual record
Lecture 22 Add links between pages using the site_url helper
Lecture 23 Create and display a form for adding a new task using the form helper
Lecture 24 Add a method to process the submitted form and insert a new record
Lecture 25 Add validation rules and validate the form
Lecture 26 Redirect to the show page if validation passes or redisplay the form if not
Lecture 27 Flash messages: add status messages to the result of processing the form
Lecture 28 Prevent XSS attacks by escaping untrusted data
Section 5: CRUD Part 2: Editing and deleting existing records
Lecture 29 Add a form to edit an existing task and link to it from the show page
Lecture 30 Add a method to process the submitted form and update the record
Lecture 31 Show the previously-entered values in the form when redisplaying it
Lecture 32 Extract shared form code out into a shared view
Lecture 33 Addendum: change to the base CodeIgniter Entity class namespace
Lecture 34 Entity classes: use an object to represent a database row instead of an array
Lecture 35 Change the create method to use the Task entity class
Lecture 36 Change the update method to use the Task entity class
Lecture 37 Extract common controller code out to the constructor
Lecture 38 Show a 404 not found page if the task ID isn't found
Lecture 39 Enable automatic updating of the created_at and updated_at fields
Lecture 40 Add a page with a confirmation message for deleting a task record
Section 6: Signup: User account registration
Lecture 41 Add and run a migration to create the user table
Lecture 42 Add a signup controller and display the signup form
Lecture 43 Add a create method and insert a new user record
Lecture 44 Use a model event to hash the password when a new record is inserted
Lecture 45 Validate the data in the signup form and redisplay it if invalid
Lecture 46 Display a signup success page on valid signup
Section 7: Authentication: login, logout and user identification
Lecture 47 Create a login controller and show the login form
Lecture 48 Verify the email and password against the user records in the database
Lecture 49 Log in the authenticated user using the session
Lecture 50 Log out the user when the browser closes and also with a logout action
Lecture 51 Add a helper to show the current user name
Lecture 52 Create and use a class for all the authentication code
Lecture 53 Add a method to get the current user
Lecture 54 Access the authentication object using a service
Lecture 55 Simplify the authentication class: extract code out to the user model and entity
Lecture 56 Avoid multiple identical database queries by caching the user record
Section 8: Protecting content: require the user to login to access certain content
Lecture 57 Require the user to login to access the tasks index page
Lecture 58 Controller filters: require login for all the methods in the tasks controller
Lecture 59 Apply a filter to certain routes to require the user not to be logged in
Lecture 60 Move links to the default layout for consistent navigation
Lecture 61 Redirect to the originally requested page after logging in
Lecture 62 Protect against cross-site request forgery attacks with the CSRF filter
Section 9: Link the tasks to users and paginate the task index
Lecture 63 Add a foreign key from the task table to the id column in the user table
Lecture 64 Show only the tasks for the current user in the task index
Lecture 65 Select individual task records for the current user only
Lecture 66 Assign the id of the current user when creating a new task record
Lecture 67 Get the current user in the task controller constructor
Lecture 68 Display the list of tasks in chronological order
Lecture 69 Paginate the list of tasks
Section 10: User administration: user CRUD
Lecture 70 Create a users controller in its own namespace
Lecture 71 Show a paginated list of user records
Lecture 72 Show an individual user record
Lecture 73 Insert a new user record
Lecture 74 Display the form for editing an existing user record
Lecture 75 Update a user record with conditional password validation
Lecture 76 Add password help text to the form when editing a user
Lecture 77 Delete a user record with confirmation
Section 11: User administration: restrict access to administrator users
Lecture 78 Require login to access the user admin controller
Lecture 79 Add a column to the user table to identify admin users
Lecture 80 Add a seeder to insert an admin user
Lecture 81 Require an admin user to access the user admin controller
Lecture 82 Display a navigation link to the users index and user admin status
Lecture 83 Prevent an admin user from deleting their own account while logged in
Lecture 84 Add an is_admin checkbox to the form for creating or editing a user
Lecture 85 Enable removal of admin privileges when editing an existing admin user
Lecture 86 Prevent an admin user from removing admin access while logged in
Section 12: Account activation by email
Lecture 87 Account activation: confirm the user's email address exists
Lecture 88 Add columns to the user table for account activation
Lecture 89 Generate a random activation token and its keyed hash
Lecture 90 Store the activation hash in the database when a user signs up
Lecture 91 Prevent inactive accounts from logging in
Lecture 92 Send an email using the CodeIgniter email library
Lecture 93 Send an activation email containing the token to the user when they sign up
Lecture 94 Activate the account when the user clicks on the link in the email
Lecture 95 Add the active status to the user admin section
Lecture 96 Instantly log a user out by making their account inactive
Section 13: User-initiated password reset
Lecture 97 Add a controller and view for starting the password reset process
Lecture 98 Add a migration to add password reset columns to the user table
Lecture 99 Create a class to generate random tokens and their hashes
Lecture 100 Process the password reset form and generate a random reset token and expiry
Lecture 101 Send the password reset email to the user
Lecture 102 Display the password reset form, checking the token and its expiry
Lecture 103 Process the password reset form and reset the user's password
Section 14: User profile: allow a user to change their own data
Lecture 104 Add a profile controller and restrict access to authenticated users only
Lecture 105 Add a form to edit the current user's details
Lecture 106 Validate and update the profile data
Lecture 107 Add a form for changing the current user's password
Lecture 108 Change the current user's password
Lecture 109 Require the user to enter their password to make changes to their profile
Section 15: Handling file uploads and images: user profile image
Lecture 110 Add a column to the user table for the profile image
Lecture 111 Add a controller with an edit method for uploading an image file
Lecture 112 Validate the uploaded file
Lecture 113 Restrict the file upload by size and type
Lecture 114 Store the uploaded file in its permanent location
Lecture 115 Resize and crop the uploaded image
Lecture 116 Save the name of the uploaded file to the user record
Lecture 117 Display a blank image for those users without a profile image
Lecture 118 Display the user's uploaded profile image in the show profile page
Lecture 119 Add an option to delete the profile image
Section 16: Remember me: remembering the login between browser sessions
Lecture 120 Remembering the login between browser sessions
Lecture 121 Add a migration to store the remember tokens in the database
Lecture 122 Add a remember me checkbox to the login form and get its value in the controller
Lecture 123 Generate a random remember me token and save its hash in the database
Lecture 124 Set a cookie containing the remember me token
Lecture 125 Refactor the authentication class
Lecture 126 Log in automatically using the token in the cookie
Lecture 127 Delete the cookie and the remembered token in the database
Lecture 128 Add a custom console command to clean up expired remembered login records
Section 17: Ajax requests and JSON: searching for tasks
Lecture 129 Addendum to "Add a JavaScript autocomplete library"
Lecture 130 Add a JavaScript autocomplete library
Lecture 131 Search for tasks by matching the description to the search term
Lecture 132 Return JSON from the search method
Lecture 133 Add a search input and make an Ajax request to the search URL
Lecture 134 Use the autocomplete library to search for tasks
Lecture 135 Navigate to the task show page when selected in the autocomplete control
Section 18: Styling and displaying dates and times
Lecture 136 Load a CSS framework in the HTML
Lecture 137 Add page padding using a section and style page headings
Lecture 138 Add a nav element and style it using the navbar component
Lecture 139 Style the notification messages with optional JavaScript to dismiss them
Lecture 140 Add styles and layout to the signup form
Lecture 141 Style the remember me checkbox in the login form
Lecture 142 Format form hint text and file input controls
Lecture 143 Style action links as buttons
Lecture 144 Style description lists using typography helper classes
Lecture 145 Add styles to tables and pagination links
Lecture 146 Display dates and times in a more readable format
Section 19: Internationalization & localization: show content in more than one language
Lecture 147 Create files to store translations and display translated text in the browser
Lecture 148 Translate text in views: text in HTML elements
Lecture 149 Translate flash messages: organise translations using nested messages
Lecture 150 Translate validation messages: manually and with the translations package
Lecture 151 Set the application locale based on the browser's language settings
Lecture 152 Specify the locale code in the URL
Lecture 153 Include the locale code in the form action URL using a global view variable
Lecture 154 Translate the signup success message and activation email content
Lecture 155 Route placeholders: add a route for activation with the locale and token
Lecture 156 Route groups: reduce the code needed to specify routes with a common prefix
Lecture 157 Internationalise and localise the login and password reset controllers
Lecture 158 Add the locale to navigation links and translate the homepage and navigation
Lecture 159 Select the homepage language with the locale code in the URL
Lecture 160 Require the locale code on the homepage and add language selection links
Lecture 161 Remember the locale in the session for URLs without the locale
Lecture 162 Restore the flash messages shown when logging in and logging out
Section 20: Deployment: install the application on a production server
Lecture 163 Deployment: prepare a folder on a production web server and an empty database
Lecture 164 Create an example .env file containing settings that differ between environments
Lecture 165 Create a controller to seed the database from the browser
Lecture 166 Copy the files to the production server
Lecture 167 Configure the application on the live server
Section 21: Conclusion
Lecture 168 Conclusion & where to go from here
Lecture 169 Bonus lecture: discount CodeIgniter web hosting
PHP developers who want to learn a lightweight but powerful framework to develop applications faster,PHP developers who want to use a framework that's simpler than Laravel