UPDATED !!: From many days ago I decided to update all my tutorials with demos and full download link projects , I found this is really helpful ,also found that making this tutorials more descriptive will help to understanding code well so if you see this tutorial be sure that you see the latest updated version of bootstrap star rating with CodeIgniter tutorial.

Note: bootstrap star rating is a part of krajee plugins if you want to read the full documentation or Bootstrap Star Rating Plugin Examples you can show it from here

Installation:

1- Download the project from the bottom link page and extract it in localhost

2- Create new database, name it as (demo)

3- Import tables from application/tables

4- Go to the URL http://localhost/bootstrap_star_rating_codeigniter/

Project structure: In this app we have

1- Rating controller

In this controller we have two methods Index to show news table with rating and create_rate to insert new rate and Clear_user_rating to delete user rates

2- Rating model

We have : get_one() This function To select our news by news_id and get_rate_numbers() This function check if user has rated specfic item or not get_item_rate() This function get ratings related to specfic item id insert_rate() This function insert ratings with news_id and user id update_rate() This function update ratings with news_id and user id delete_user_rating() This function delete ratings of new from all tables by news_id and user_id



5- Global folder

Contains assets file like bootstrap 3 main framework and starter theme with JavaScript , HTML , CSS files also contains /rating directory which has all bootstrap rating files

6- Views folder

Which contains views file for our layout templates with header and footer and content

Why I use bootstrap star rating because it was easy to customize and compatible with bootstrap the most popular design framework and it has wonderful documentation to do everything

Also, it was very light ,it uses glyph-icon.

TRY Demo Download