Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/davide-casiraghi/laravel-cards
Create in Laravel, flexible and extensible bootstrap 4 content container with multiple variants and options.
https://github.com/davide-casiraghi/laravel-cards
bootstrap-4 cards laravel laravel-5-package
Last synced: 18 days ago
JSON representation
Create in Laravel, flexible and extensible bootstrap 4 content container with multiple variants and options.
- Host: GitHub
- URL: https://github.com/davide-casiraghi/laravel-cards
- Owner: davide-casiraghi
- License: mit
- Created: 2019-05-07T15:57:12.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-01-21T15:59:28.000Z (about 5 years ago)
- Last Synced: 2024-12-15T21:49:59.678Z (about 1 month ago)
- Topics: bootstrap-4, cards, laravel, laravel-5-package
- Language: PHP
- Homepage:
- Size: 213 KB
- Stars: 1
- 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 Cards
[![Latest Stable Version on Packagist](https://img.shields.io/packagist/v/davide-casiraghi/laravel-cards.svg?style=flat-square)](https://packagist.org/packages/davide-casiraghi/laravel-cards)
[![StyleCI](https://styleci.io/repos/185434966/shield?style=flat-square)](https://styleci.io/repos/185434966)
[![Quality Score](https://img.shields.io/scrutinizer/g/davide-casiraghi/laravel-cards.svg?style=flat-square)](https://scrutinizer-ci.com/g/davide-casiraghi/laravel-cards)
[![Coverage Status](https://scrutinizer-ci.com/g/davide-casiraghi/laravel-cards/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/davide-casiraghi/laravel-cards/)
[![GitHub last commit](https://img.shields.io/github/last-commit/davide-casiraghi/laravel-cards.svg)](https://github.com/davide-casiraghi/laravel-cards)This Laravel package show a responsive card made by text on one side of the page and an image on the other.
The library replace all the occurances of this snippet
```
{# card card_id=[1] #}
```
With the some HTML code of a responsive card made by text on one side and an image on the other.
This code uses **bootstrap 4**.
```html
".$card_1['title']."
".$card_1['body']."
```## Installation
You can install the package via composer:
```bash composer require davide-casiraghi/laravel-cards ```
### Publish all the vendor files
```php artisan vendor:publish --force```### Import the _card.scss file in /resources/scss/app.scss
```php
@import 'vendor/laravel-cards/card';
```and then run in console:
```npm run dev```## 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 route will be available:``` /laravel-cards ```
Accessing to this routes you can manage the cards.
Then to replace all the occurrance of the card snippets:
``` php
use DavideCasiraghi\LaravelCards\Facades\LaravelCards;$text = LaravelCards::replace_card_snippets_with_template($text);
```### 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.