Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/davide-casiraghi/laravel-testimonials
A Laravel package to show testimonials trough a carousel. The contents support multi language.
https://github.com/davide-casiraghi/laravel-testimonials
Last synced: 29 days ago
JSON representation
A Laravel package to show testimonials trough a carousel. The contents support multi language.
- Host: GitHub
- URL: https://github.com/davide-casiraghi/laravel-testimonials
- Owner: davide-casiraghi
- License: mit
- Created: 2019-07-16T10:02:28.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-01-21T16:02:55.000Z (about 5 years ago)
- Last Synced: 2024-11-06T21:16:48.244Z (3 months ago)
- Language: PHP
- Size: 240 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Laravel testimonials
[![Latest Version on Packagist](https://img.shields.io/packagist/v/davide-casiraghi/laravel-testimonials.svg?style=flat-square)](https://packagist.org/packages/davide-casiraghi/laravel-testimonials)
[![Build Status](https://img.shields.io/travis/davide-casiraghi/laravel-testimonials/master.svg?style=flat-square)](https://travis-ci.org/davide-casiraghi/laravel-testimonials)
[![StyleCI](https://styleci.io/repos/197168921/shield?style=flat-square)](https://styleci.io/repos/197168921)
[![Quality Score](https://img.shields.io/scrutinizer/g/davide-casiraghi/laravel-testimonials.svg?style=flat-square)](https://scrutinizer-ci.com/g/davide-casiraghi/laravel-testimonials)
[![Coverage Status](https://scrutinizer-ci.com/g/davide-casiraghi/laravel-testimonials/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/davide-casiraghi/laravel-testimonials/)
[![GitHub last commit](https://img.shields.io/github/last-commit/davide-casiraghi/laravel-testimonials.svg)](https://github.com/davide-casiraghi/laravel-testimonials)A Laravel package to show testimonials trough a carousel. The contents support multi language.
## Installation
You can install the package via composer:
```bash
composer require davide-casiraghi/laravel-testimonials
```### Publish all the vendor files
```php artisan vendor:publish --force```### Run the database migrations
```php artisan migrate```### Install also slick carousel
```bash
npm install slick-carousel
```### Import the scss files
Add this line to your **resources/sass/app.scss** file:```
@import "~slick-carousel/slick/slick";
@import "~slick-carousel/slick/slick-theme";
@import 'vendor/laravel-testimonials/testimonials';
```and then run in console:
```npm run dev```### Import the js files
Add this line to your **resources/js/app.js** file:
```
require('./vendor/laravel-testimonials/testimonials');
import 'slick-carousel';
```## Usage
### Authorization
> To work the package aspect that in your user model and table you have a field called **group** that can have this possible values:
- null: Registered user
- 1: Super Admin
- 2: Admin> Just the users that have **Admin** and **Super admin** privileges can access to the routes that allow to create, edit and delete the blogs, categories and posts. Otherwise you get redirected to the homepage.
### Access to the package
After the package is published this new routes will be available:
- /testimonialGroups
- /testimonialsAccessing to this routes you can manage new testimonial groups and testimonials.
### Replace the snippet occurrances
Add the replace funcion to your code in the show() funcion of the controller.
``` php
use DavideCasiraghi\LaravelTestimonials\Facades\LaravelTestimonials;$text = LaravelTestimonials::replace_testimonial_group_snippets_with_template($text);
```### Use the code snippet in your posts
Then the library will replace all the occurances of this snippet:```{# testimonial_group testimonial_group_id=[1] #} ```
with the some HTML code of the relative testimonial group. This code uses bootstrap 4.
### Testing
``` bash
./vendor/bin/phpunit --coverage-html=html
```### Changelog
Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.
## Contributing
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
### Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
## Credits
- [Davide Casiraghi](https://github.com/davide-casiraghi)
- [All Contributors](../../contributors)## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
## Laravel Package Boilerplate
This package was generated using the [Laravel Package Boilerplate](https://laravelpackageboilerplate.com).