Skip to content

abdullah-alfar/simple_crud

Repository files navigation

1- go to application/config.php

search for base_url and change to what you want ex :http://localhost:8000

2- create table call users :

CREATE TABLE users (
id INT(11) NOT NULL AUTO_INCREMENT, first_name VARCHAR(255) NOT NULL, last_name VARCHAR(255) NOT NULL, age VARCHAR(255) NOT NULL, email VARCHAR(255) NOT NULL, password VARCHAR(255) NOT NULL, PRIMARY KEY (id)

) ENGINE=INNODB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1

3- create table call posts : CREATE TABLE posts (

id int(11) NOT NULL AUTO_INCREMENT, title varchar(255) NOT NULL, content varchar(255) NOT NULL, image varchar(255) NOT NULL, user_id int(11) NOT NULL, PRIMARY KEY (id)

) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=latin1

or you can use database dump (crud.sql)

** to insert fake posts :

run : {base_url}/post/seed

4- crud users : {base_url}/user

5- api of list posts : {base_url}/post/api

6- list of posts : {base_url}/post

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages