to make a blog app with code igniter
Go to file
josephkurian 2da6072a05 pages commit 2024-07-11 09:53:32 +05:30
application pages commit 2024-07-11 09:53:32 +05:30
assets pages commit 2024-07-11 09:53:32 +05:30
system pages commit 2024-07-11 09:53:32 +05:30
.htaccess pages commit 2024-07-11 09:53:32 +05:30
composer.json pages commit 2024-07-11 09:53:32 +05:30
contributing.md pages commit 2024-07-11 09:53:32 +05:30
index.php pages commit 2024-07-11 09:53:32 +05:30
license.txt pages commit 2024-07-11 09:53:32 +05:30
readme.rst pages commit 2024-07-11 09:53:32 +05:30

readme.rst

###################
ciBlog
###################

This is a simple blog application built on CodeIgniter 3.x. It is from the YouTube series [Build a CodeIgniter PHP App](https://www.youtube.com/watch?v=I752ofYu7ag)

*******************
Usage
*******************

Create the database with the posts table and upload to your host

**************************
SQL
**************************

CREATE TABLE `posts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `category_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `body` text NOT NULL,
  `post_image` varchar(255) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB;


CREATE TABLE `categories` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB;

CREATE TABLE `comments` (
  `id` int(11) NOT NULL,
  `post_id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `body` text NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB;

CREATE TABLE `users` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `zipcode` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `username` varchar(255) NOT NULL,
  `password` varchar(255) NOT NULL,
  `register_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB;