GithubHelp home page GithubHelp logo

ramzyvirani / rateandreview Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 16 KB

Rate and Review Module for ramzyvirani/laravel-boilerplate

PHP 84.37% Blade 15.63%
php laravel laravel-boilerplate rate-and-review rating review

rateandreview's Introduction

Rate And Review Module for the Boilerplate

Maintainability Test Coverage

Install this package with my boilerplate to add Rate and Review feature in your application. This module registers below components in the application.

This module implements Laravel's polymorphic relations so that you can easily attach one or more models.

PS: This module is highly dependant on the Boilerplate. Because this module extends some of the base classes Boilerplate has.

General

  • Configuration
  • Helper
  • Migration
  • Model
  • Repository

Admin

  • Controller
  • Data Table
  • Request Classes
  • Routes
  • Views

API

  • Controllers
  • Criteria
  • Request Classes
  • Routes

How to install

Please make sure that you have completely installed the boilerplate including and most importantly executed the migration from the boilerplate.

Execute below command to add this package in your project's composer dependencies.

composer require ramzyvirani/rateandreview "*"

Execute below command to publish views and config

php artisan vendor:publish --tag=RamzyVirani\RateAndReview\RateAndReviewServiceProvider

Execute migrations to create Reviews Table, Module, Menu, Permissions

php artisan migrate

PS: You will need to login with Super Admin to grant permissions to the admin and other roles.

How to Add Reviewable Options

Follow below points to add reviewable options in Admin Panel's Create/Edit forms and also use human readable instance type in Index Details Views.

  • Create a new Review Model in your application.
  • Extend it from RamzyVirani\RateAndReview\Models\Review.
  • Declare a public static property (array) named $INSTANCE_TYPE (E.g. in the original model).
    • Use FQDN of the polymorphic relations as the key and Human readable text as value
  • Change the fqdn in config/rateandreview.php

How to Extend Features

To Modify/Extend any functionality, Create a new class and extend it from the original Then, change the namespaces and fqdn in the config/rateandreview.php. Implement only those methods you want to modify.

  • RamzyVirani\RateAndReview\Criteria\ReviewCriteria
  • RamzyVirani\RateAndReview\DataTables\ReviewDataTable
  • RamzyVirani\RateAndReview\Models\Review
  • RamzyVirani\RateAndReview\Controllers\Admin\ReviewController
  • RamzyVirani\RateAndReview\Controllers\Api\ReviewAPIController
  • RamzyVirani\RateAndReview\Repositories\ReviewRepository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.