PHPackages                             davide-casiraghi/laravel-cards - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. davide-casiraghi/laravel-cards

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

davide-casiraghi/laravel-cards
==============================

A flexible and extensible content container with multiple variants and options.

2.1.2(6y ago)11191MITPHPPHP ^7.1

Since May 8Pushed 6y agoCompare

[ Source](https://github.com/davide-casiraghi/laravel-cards)[ Packagist](https://packagist.org/packages/davide-casiraghi/laravel-cards)[ Docs](https://github.com/davide-casiraghi/laravel-cards)[ RSS](/packages/davide-casiraghi-laravel-cards/feed)WikiDiscussions master Synced yesterday

READMEChangelog (10)Dependencies (8)Versions (15)Used By (1)

Laravel Cards
=============

[](#laravel-cards)

[![Latest Stable Version on Packagist](https://camo.githubusercontent.com/8900b9a8960e2179f79ab8c61b99ba999293a6d95c7bbaa0b86307c3dcd9f5e1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6461766964652d6361736972616768692f6c61726176656c2d63617264732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/davide-casiraghi/laravel-cards)[![StyleCI](https://camo.githubusercontent.com/c2d6aff783e31be9ae62bd45caacb5bdc2ef741772bd0d2bae2b5ced60cdc9b1/68747470733a2f2f7374796c6563692e696f2f7265706f732f3138353433343936362f736869656c643f7374796c653d666c61742d737175617265)](https://styleci.io/repos/185434966)[![Build Status](https://camo.githubusercontent.com/5a6abdce4ca56fa62125b9884e4ef576f262d782c79bd8eead26f9352365fcf3/68747470733a2f2f7472617669732d63692e6f72672f6461766964652d6361736972616768692f6c61726176656c2d63617264732e737667)](https://travis-ci.org/davide-casiraghi/laravel-cards)[![Quality Score](https://camo.githubusercontent.com/acb8019289d2bd683855cf91facf7d812aae0b3f23fa7cd7b980a86f55372431/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6461766964652d6361736972616768692f6c61726176656c2d63617264732e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/davide-casiraghi/laravel-cards)[![Coverage Status](https://camo.githubusercontent.com/c753eadc0da4ac38c6eb82d0fcd86b4a7506da5a6eaad591872d3b5d16169795/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6461766964652d6361736972616768692f6c61726176656c2d63617264732f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/davide-casiraghi/laravel-cards/)[![](https://camo.githubusercontent.com/af3b240f785f356b3d3b081a682ff9c03bdc5aaafa7844d44e5087fec6be1cec/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f64356362373962626430653962336132393430652f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/davide-casiraghi/laravel-cards/maintainability)[![GitHub last commit](https://camo.githubusercontent.com/8bc82e53510cbfc91109441034b94e066b11fd9060eb136d28c7ddb4446f3a32/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6173742d636f6d6d69742f6461766964652d6361736972616768692f6c61726176656c2d63617264732e737667)](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**.

```

		".$card_1['title']."
		".$card_1['body']."

```

Installation
------------

[](#installation)

You can install the package via composer:

`bash composer require davide-casiraghi/laravel-cards `

### Publish all the vendor files

[](#publish-all-the-vendor-files)

`php artisan vendor:publish --force`

### Import the \_card.scss file in /resources/scss/app.scss

[](#import-the-_cardscss-file-in-resourcesscssappscss)

```
@import 'vendor/laravel-cards/card';
```

and then run in console:
`npm run dev`

Usage
-----

[](#usage)

### Authorization

[](#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

[](#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:

```
use DavideCasiraghi\LaravelCards\Facades\LaravelCards;

$text = LaravelCards::replace_card_snippets_with_template($text);
```

### Testing

[](#testing)

`bash ./vendor/bin/phpunit --coverage-html=html`

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Davide Casiraghi](https://github.com/davide-casiraghi)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~20 days

Recently: every ~57 days

Total

14

Last Release

2304d ago

Major Versions

1.0.7 → 2.0.02019-06-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/9d09fa0d9b2a45d611866ca55a837bf8ca2da760ef1aa250cd59f04970f90abf?d=identicon)[davide-casiraghi](/maintainers/davide-casiraghi)

---

Top Contributors

[![davide-casiraghi](https://avatars.githubusercontent.com/u/6308587?v=4)](https://github.com/davide-casiraghi "davide-casiraghi (189 commits)")

---

Tags

bootstrap-4cardslaravellaravel-5-packagedavide-casiraghilaravel-cards

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/davide-casiraghi-laravel-cards/health.svg)

```
[![Health](https://phpackages.com/badges/davide-casiraghi-laravel-cards/health.svg)](https://phpackages.com/packages/davide-casiraghi-laravel-cards)
```

###  Alternatives

[laravolt/avatar

Turn name, email, and any other string into initial-based avatar or gravatar.

2.0k5.4M31](/packages/laravolt-avatar)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[beyondcode/laravel-favicon

Create dynamic favicons based on your environment settings.

37345.5k](/packages/beyondcode-laravel-favicon)[erlandmuchasaj/laravel-gzip

Gzip your responses.

40129.3k2](/packages/erlandmuchasaj-laravel-gzip)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
