2018-09-23 09:21:22 -07:00
<!DOCTYPE html>
<!-- [if IE 8]><html class="no - js lt - ie9" lang="en" > <![endif] -->
<!-- [if gt IE 8]><! --> < html class = "no-js" lang = "en" > <!-- <![endif] -->
< head >
< meta charset = "utf-8" >
< meta name = "viewport" content = "width=device-width, initial-scale=1.0" >
2019-05-06 15:00:34 -07:00
< title > Tutorial — CodeIgniter4 4.0.0-beta.3 documentation< / title >
2018-09-23 09:21:22 -07:00
< link rel = "shortcut icon" href = "../_static/ci-icon.ico" / >
< link rel = "stylesheet" href = "../_static/css/citheme.css" type = "text/css" / >
2019-05-06 15:00:34 -07:00
< link rel = "top" title = "CodeIgniter4 4.0.0-beta.3 documentation" href = "../index.html" / >
2018-09-23 09:21:22 -07:00
< link rel = "next" title = "Static pages" href = "static_pages.html" / >
2019-01-25 14:00:40 -08:00
< link rel = "prev" title = "CodeIgniter Repositories" href = "../installation/repositories.html" / >
2018-09-23 09:21:22 -07:00
< script src = "../_static/js/modernizr.min.js" > < / script >
< / head >
< body class = "wy-body-for-nav" role = "document" >
< div class = "wy-grid-for-nav" >
< nav data-toggle = "wy-nav-shift" class = "wy-nav-side" >
< div class = "wy-side-scroll" >
< div class = "wy-side-nav-search" >
< a href = "../index.html" class = "icon icon-home" > CodeIgniter4
< / a >
< div role = "search" >
< form id = "rtd-search-form" class = "wy-form" action = "../search.html" method = "get" >
< input type = "text" name = "q" placeholder = "Search docs" / >
< input type = "hidden" name = "check_keywords" value = "yes" / >
< input type = "hidden" name = "area" value = "default" / >
< / form >
< / div >
< / div >
< div class = "wy-menu wy-menu-vertical" data-spy = "affix" role = "navigation" aria-label = "main navigation" >
< ul >
< li class = "toctree-l1" > < a class = "reference internal" href = "../intro/index.html" > Welcome to CodeIgniter4< / a > < / li >
< / ul >
< ul >
< li class = "toctree-l1" > < a class = "reference internal" href = "../installation/index.html" > Installation< / a > < / li >
< / ul >
< ul class = "current" >
< li class = "toctree-l1 current" > < a class = "current reference internal" href = "#" > Tutorial< / a > < ul >
< li class = "toctree-l2" > < a class = "reference internal" href = "static_pages.html" > Static pages< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "news_section.html" > News section< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "create_news_items.html" > Create news items< / a > < / li >
< li class = "toctree-l2" > < a class = "reference internal" href = "conclusion.html" > Conclusion< / a > < / li >
< / ul >
< / li >
< / ul >
< ul >
< li class = "toctree-l1" > < a class = "reference internal" href = "../concepts/index.html" > CodeIgniter4 Overview< / a > < / li >
< / ul >
< ul >
< li class = "toctree-l1" > < a class = "reference internal" href = "../general/index.html" > General Topics< / a > < / li >
< / ul >
< ul >
2018-09-25 07:00:21 -07:00
< li class = "toctree-l1" > < a class = "reference internal" href = "../incoming/index.html" > Controllers and Routing< / a > < / li >
< / ul >
< ul >
< li class = "toctree-l1" > < a class = "reference internal" href = "../outgoing/index.html" > Building Responses< / a > < / li >
< / ul >
< ul >
< li class = "toctree-l1" > < a class = "reference internal" href = "../database/index.html" > Working With Databases< / a > < / li >
< / ul >
< ul >
< li class = "toctree-l1" > < a class = "reference internal" href = "../models/index.html" > Modeling Data< / a > < / li >
2018-09-23 09:21:22 -07:00
< / ul >
< ul >
2018-09-25 07:00:21 -07:00
< li class = "toctree-l1" > < a class = "reference internal" href = "../dbmgmt/index.html" > Managing Databases< / a > < / li >
< / ul >
< ul >
< li class = "toctree-l1" > < a class = "reference internal" href = "../libraries/index.html" > Library Reference< / a > < / li >
2018-09-23 09:21:22 -07:00
< / ul >
< ul >
< li class = "toctree-l1" > < a class = "reference internal" href = "../helpers/index.html" > Helpers< / a > < / li >
< / ul >
< ul >
< li class = "toctree-l1" > < a class = "reference internal" href = "../testing/index.html" > Testing< / a > < / li >
< / ul >
< ul >
2018-09-25 07:00:21 -07:00
< li class = "toctree-l1" > < a class = "reference internal" href = "../cli/index.html" > Command Line Usage< / a > < / li >
< / ul >
< ul >
< li class = "toctree-l1" > < a class = "reference internal" href = "../extending/index.html" > Extending CodeIgniter< / a > < / li >
< / ul >
< ul >
2018-09-23 09:21:22 -07:00
< li class = "toctree-l1" > < a class = "reference internal" href = "../license.html" > The MIT License (MIT)< / a > < / li >
2018-11-16 02:16:56 -08:00
< li class = "toctree-l1" > < a class = "reference internal" href = "../changelogs/index.html" > Change Logs< / a > < / li >
2018-09-23 09:21:22 -07:00
< / ul >
< / div >
< / div >
< / nav >
< section data-toggle = "wy-nav-shift" class = "wy-nav-content-wrap" >
< nav class = "wy-nav-top" role = "navigation" aria-label = "top navigation" >
< i data-toggle = "wy-nav-top" class = "fa fa-bars" > < / i >
< a href = "../index.html" > CodeIgniter4< / a >
< / nav >
< div class = "wy-nav-content" >
< div class = "rst-content" >
< div role = "navigation" aria-label = "breadcrumbs navigation" >
< ul class = "wy-breadcrumbs" >
< li > < a href = "../index.html" > Docs< / a > » < / li >
< li > Tutorial< / li >
< li class = "wy-breadcrumbs-aside" >
< / li >
< / ul >
< hr / >
< / div >
< div role = "main" class = "document" itemscope = "itemscope" itemtype = "http://schema.org/Article" >
< div itemprop = "articleBody" >
< div class = "section" id = "tutorial" >
< h1 > Tutorial< a class = "headerlink" href = "#tutorial" title = "Permalink to this headline" > ¶< / a > < / h1 >
2019-01-30 07:49:33 -08:00
< p > This tutorial is intended to introduce you to the CodeIgniter4 framework
2018-09-23 09:21:22 -07:00
and the basic principles of MVC architecture. It will show you how a
2019-03-09 09:37:12 -08:00
basic CodeIgniter application is constructed in a step-by-step fashion.< / p >
2019-01-30 07:49:33 -08:00
< p > If you are not familiar with PHP, we recommend that you check out
2019-01-31 11:00:34 -08:00
the < a class = "reference external" href = "https://www.w3schools.com/php/default.asp" > W3Schools PHP Tutorial< / a > before continuing.< / p >
2018-09-23 09:21:22 -07:00
< p > In this tutorial, you will be creating a < strong > basic news application< / strong > . You
will begin by writing the code that can load static pages. Next, you
will create a news section that reads news items from a database.
Finally, you’ ll add a form to create news items in the database.< / p >
< p > This tutorial will primarily focus on:< / p >
< ul class = "simple" >
< li > Model-View-Controller basics< / li >
< li > Routing basics< / li >
< li > Form validation< / li >
2019-01-30 07:49:33 -08:00
< li > Performing basic database queries using CodeIgniter’ s “ Query Builder” < / li >
2018-09-23 09:21:22 -07:00
< / ul >
< p > The entire tutorial is split up over several pages, each explaining a
small part of the functionality of the CodeIgniter framework. You’ ll go
through the following pages:< / p >
< ul class = "simple" >
< li > Introduction, this page, which gives you an overview of what to
expect.< / li >
< li > < a class = "reference internal" href = "static_pages.html" > < span class = "doc" > Static pages< / span > < / a > , which will teach you the basics
of controllers, views and routing.< / li >
< li > < a class = "reference internal" href = "news_section.html" > < span class = "doc" > News section< / span > < / a > , where you’ ll start using models
and will be doing some basic database operations.< / li >
< li > < a class = "reference internal" href = "create_news_items.html" > < span class = "doc" > Create news items< / span > < / a > , which will introduce
more advanced database operations and form validation.< / li >
< li > < a class = "reference internal" href = "conclusion.html" > < span class = "doc" > Conclusion< / span > < / a > , which will give you some pointers on
further reading and other resources.< / li >
< / ul >
< p > Enjoy your exploration of the CodeIgniter framework.< / p >
< div class = "toctree-wrapper compound" >
< / div >
< / div >
< / div >
< div class = "articleComments" >
< / div >
< / div >
< footer >
< div class = "rst-footer-buttons" role = "navigation" aria-label = "footer navigation" >
< a href = "static_pages.html" class = "btn btn-neutral float-right" title = "Static pages" accesskey = "n" rel = "next" > Next < span class = "fa fa-arrow-circle-right" > < / span > < / a >
2019-01-25 14:00:40 -08:00
< a href = "../installation/repositories.html" class = "btn btn-neutral" title = "CodeIgniter Repositories" accesskey = "p" rel = "prev" > < span class = "fa fa-arrow-circle-left" > < / span > Previous< / a >
2018-09-23 09:21:22 -07:00
< / div >
< hr / >
< div role = "contentinfo" >
< p >
2018-12-26 22:57:58 -08:00
© Copyright 2014-2019 British Columbia Institute of Technology.
2019-06-24 06:40:55 -07:00
Last updated on Jun 24, 2019.
2018-09-23 09:21:22 -07:00
< / p >
< / div >
Built with < a href = "http://sphinx-doc.org/" > Sphinx< / a > using a < a href = "https://github.com/snide/sphinx_rtd_theme" > theme< / a > provided by < a href = "https://readthedocs.org" > Read the Docs< / a > .
< / footer >
< / div >
< / div >
< / section >
< / div >
< script type = "text/javascript" >
var DOCUMENTATION_OPTIONS = {
URL_ROOT:'../',
2019-05-06 15:00:34 -07:00
VERSION:'4.0.0-beta.3',
2018-09-23 09:21:22 -07:00
COLLAPSE_INDEX:false,
FILE_SUFFIX:'.html',
HAS_SOURCE: false,
SOURCELINK_SUFFIX: ''
};
< / script >
< script type = "text/javascript" src = "../_static/jquery.js" > < / script >
< script type = "text/javascript" src = "../_static/underscore.js" > < / script >
< script type = "text/javascript" src = "../_static/doctools.js" > < / script >
< script type = "text/javascript" src = "../_static/js/theme.js" > < / script >
< script type = "text/javascript" >
jQuery(function () {
SphinxRtdTheme.StickyNav.enable();
});
< / script >
< / body >
< / html >