Get started with CodeIgniter 4
By: Luis A. Sierra
Before proceeding on this tutorial, you must have an environment already setup to run and install CodeIgniter 4.
If you haven’t, please do read my blog: https://interesting-homemade-projects.heliohost.us/post.php?slug=installing-codeigniter-php-framework-in-iis
Get started
1 - go to app -> Views and then create a file name greetings.php
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>
div {
margin-bottom: 15px;
padding: 4px 12px;
}
.danger {
background-color: #ffdddd;
border-left: 6px solid #f44336;
}
.success {
background-color: #ddffdd;
border-left: 6px solid #04AA6D;
}
.info {
background-color: #e7f3fe;
border-left: 6px solid #2196F3;
}
.warning {
background-color: #ffffcc;
border-left: 6px solid #ffeb3b;
}
</style>
</head>
<body>
<h2>Get started</h2>
<div class="success">
<p><strong>Welcome</strong> to CodeIgniter 4</p>
</div>
<div class="info">
<p>I'm <strong>Luis A. Sierra</strong></p>
</div>
</body>
</html>
3 - Now go to app -> Controllers and then open the file name Home.php and replace welcome_message by greetings
Congratulations 😎👏
Post a Comment