mohammedeisa / rating-bundle
Meisa Rating bundle
Installs: 25
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- doctrine/doctrine-bundle: ~1.2
- doctrine/orm: ~2.2,>=2.2.3
- symfony/assetic-bundle: ~2.3
- twig/extensions: ~1.0
This package is not auto-updated.
Last update: 2024-12-21 18:58:59 UTC
README
About the bundle
MEisaRatingBundle embeds a rating stars into any part of your application using just one line of code. Installation:
run this command:
$ composer require mohammedeisa/rating-bundle
or add this line to your composer.json
"mohammedeisa/rating-bundle": "~2.0"
Add the bundle to your registered bundles:
new Meisa\RatingBundle\MeisaRatingBundle()
Include these files into your template
'<link href="{{ asset('css/bootstrap.min.css')}}" rel="stylesheet">'
<link href="{{asset('css/font-awesome.min.css')}}" rel="stylesheet">
<script src="{{ asset('js/jquery.js') }}"></script>
<script src="{{ asset('js/bootstrap.min.js') }}"></script>
<link rel="stylesheet" href="{{ asset('bundles/meisarating/css/rating.css') }}"/>
*<script type="text/javascript" src="{{ asset('bundles/meisarating/js/rating.js') }}"></script>
*<script src="{{ asset('bundles/fosjsrouting/js/router.js') }}" type="text/javascript" ></script>
*<script src="{{ path('fos_js_routing_js', {"callback": "fos.Router.setData"}) }}" type="text/javascript" ></script>
Import bundle configurations:
- { resource: @MeisaRatingBundle/Resources/config/config.yml }
Enable the bundle routing:
meisa_rating:
resource: "@MeisaRatingBundle/Controller/"
type: annotation
prefix: /
Usage:
{{ "rating_1"|show_rating|raw }}
change "rating_1" so that it should be unique over your application.