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.
<div class='row laravel-card' style='background-color: #345642;color: #212529;'>
<div class='text col-md-9 my-auto px-4 order-md-1'>
<h2 class='laravel-card-heading mt-5'>".$card_1['title']."</h2>
<div class='lead mb-4'>".$card_1['body']."</div>
</div>
<div class='image col-md-3 order-md-2'></div>
</div>
You can install the package via composer:
bash composer require davide-casiraghi/laravel-cards
php artisan vendor:publish --force
@import 'vendor/laravel-cards/card';
and then run in console:
npm run dev
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.
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:
use DavideCasiraghi\LaravelCards\Facades\LaravelCards;
$text = LaravelCards::replace_card_snippets_with_template($text);
bash ./vendor/bin/phpunit --coverage-html=html
Please see CHANGELOG for more information what has changed recently.
Please see CONTRIBUTING for details.
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
The MIT License (MIT). Please see License File for more information.