PHPackages                             soufiene-slimi/star-field-for-backpack - 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. [Admin Panels](/categories/admin)
4. /
5. soufiene-slimi/star-field-for-backpack

ActiveLibrary[Admin Panels](/categories/admin)

soufiene-slimi/star-field-for-backpack
======================================

Easily rate items with stars using this new field type.

1.0.0(6y ago)155.0k5[1 issues](https://github.com/soufiene-slimi/star-field-for-backpack/issues)[1 PRs](https://github.com/soufiene-slimi/star-field-for-backpack/pulls)MITHTML

Since Apr 25Pushed 5y ago1 watchersCompare

[ Source](https://github.com/soufiene-slimi/star-field-for-backpack)[ Packagist](https://packagist.org/packages/soufiene-slimi/star-field-for-backpack)[ Docs](https://github.com/soufiene-slimi/star-field-for-backpack)[ RSS](/packages/soufiene-slimi-star-field-for-backpack/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

Star Field for Backpack 4.1
===========================

[](#star-field-for-backpack-41)

[![Latest Version on Packagist](https://camo.githubusercontent.com/3c083728a1daa8f2cd0ebbae3254c7d976c2d5ecbcd7dbb559cd09a8e3713ea7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f736f756669656e652d736c696d692f737461722d6669656c642d666f722d6261636b7061636b2e737667)](https://packagist.org/packages/soufiene-slimi/star-field-for-backpack)[![Build Status](https://camo.githubusercontent.com/3e0278eb2d2dc90f93ce1271a55e028ba1b988b966372b2395d7b56dfc036e42/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f736f756669656e652d736c696d692f737461722d6669656c642d666f722d6261636b7061636b2f6261646765732f6275696c642e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/soufiene-slimi/star-field-for-backpack/build-status/master)[![Quality Score](https://camo.githubusercontent.com/4e0666c8352e64caa4dcd845f087ef7446788b1cbc01631665a44bb44a4272f7/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f736f756669656e652d736c696d692f737461722d6669656c642d666f722d6261636b7061636b2e737667)](https://scrutinizer-ci.com/g/soufiene-slimi/star-field-for-backpack)[![Total Downloads](https://camo.githubusercontent.com/939e610b8541c3a6c4220bd061b0f75d00b4bae1d30edf522e7ec8df737b01f4/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f736f756669656e652d736c696d692f737461722d6669656c642d666f722d6261636b7061636b2e737667)](https://packagist.org/packages/soufiene-slimi/star-field-for-backpack)

This package provides a `star` field type for the [Backpack for Laravel](https://backpackforlaravel.com/) administration panel. The `star` field allows admins to ***change* the value of a integer variable in order to rate the item, in a prettier way**. It uses a CSS-only solution, so it has zero external dependencies and zero javascript.

Screenshots
-----------

[](#screenshots)

[![Backpack Star Field Addon](https://user-images.githubusercontent.com/10948245/79363306-a4a27980-7f3f-11ea-8f66-618f460ef3fc.PNG)](https://user-images.githubusercontent.com/10948245/79363306-a4a27980-7f3f-11ea-8f66-618f460ef3fc.PNG)

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

[](#installation)

Via Composer

```
composer require soufiene-slimi/star-field-for-backpack
```

Usage
-----

[](#usage)

Inside your custom CrudController:

```
CRUD::addField([
    'view_namespace' => 'star-field-for-backpack::fields',
    'name' => 'rate',
    'type' => 'star',
    // 'label' => 'Rating', // (optional)
    // 'count' => 8, // (optional) the max rate count; default value is 5
    // 'default' => 6, // (optional) the default checked rate on new item creation
    // 'hint' => 'Cheer up!', // (optional)
    // 'options' => [ // (optional) customize the look
    //     'icon' => '★', // (optional) the default icon is ★
    //     'unchecked_color' => '#ccc', // (optional) the default value is #ccc
    //     'checked_color' => '#ffc700', // (optional) the default value is #ffc700
    //     'hover_color' => '#c59b08', // (optional) the default value is #c59b08
    // ],
]);
```

Notice the `view_namespace` attribute - make sure that is exactly as above, to tell Backpack to load the field from this *addon package*, instead of assuming it's inside the *Backpack\\CRUD package*.

Overwriting
-----------

[](#overwriting)

If you need to change the field in any way, you can easily publish the file to your app, and modify that file any way you want. But please keep in mind that you will not be getting any updates.

**Step 1.** Copy-paste the blade file to your directory:

```
# create the fields directory if it's not already there
mkdir -p resources/views/vendor/backpack/crud/fields

# copy the blade file inside the folder we created above
cp -i vendor/soufiene-slimi/star-field-for-backpack/src/resources/views/fields/star.blade.php resources/views/vendor/backpack/crud/fields/star.blade.php
```

**Step 2.** Remove the vendor namespace wherever you've used the field:

```
$this->crud->addField([
-   'view_namespace' => 'star-field-for-backpack::fields'
    'name' => 'rate',
    'type' => 'star',
]);
```

**Step 3.** Uninstall this package. Since it only provides one file - `star.blade.php`, and you're no longer using that file, it makes no sense to have the package installed:

```
composer remove soufiene-slimi/star-field-for-backpack
```

Change log
----------

[](#change-log)

Please see the [changelog](changelog.md) for more information on what has changed recently.

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

[](#contributing)

Please see [contributing.md](contributing.md) for details and a todolist.

Security
--------

[](#security)

If you discover any security related issues, please email [the author](composer.json) instead of using the issue tracker.

Credits
-------

[](#credits)

- [Cristian Tabacitu](https://github.com/tabacitu) - created an example field type addon and shared it in [this repo](https://github.com/DigitallyHappy/toggle-field-for-backpack);
- [Soufiene Slimi](https://github.com/soufiene-slimi) - polish &amp; packaging;
- [All Contributors](../../contributors)

License
-------

[](#license)

MIT. Please see the [license file](license.md) for more information.

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

2254d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10948245?v=4)[Soufiene Slimi](/maintainers/soufiene-slimi)[@soufiene-slimi](https://github.com/soufiene-slimi)

---

Top Contributors

[![soufiene-slimi](https://avatars.githubusercontent.com/u/10948245?v=4)](https://github.com/soufiene-slimi "soufiene-slimi (6 commits)")

---

Tags

addonadmin-panelbackpackbackpack-for-laravelfieldlaravelratestarlaravelRateaddonadmin-panelstarbackpackBackpack for Laravel

### Embed Badge

![Health badge](/badges/soufiene-slimi-star-field-for-backpack/health.svg)

```
[![Health](https://phpackages.com/badges/soufiene-slimi-star-field-for-backpack/health.svg)](https://phpackages.com/packages/soufiene-slimi-star-field-for-backpack)
```

###  Alternatives

[ziming/json-field-for-backpack

A Json Editor Field for Backpack

35101.5k](/packages/ziming-json-field-for-backpack)[izica/relations-widgets-for-backpack

Widgets for preview model relations in laravel backpack

2929.2k](/packages/izica-relations-widgets-for-backpack)[digitallyhappy/toggle-field-for-backpack

Easily toggle boolean attributes with a new field type.

2139.3k](/packages/digitallyhappy-toggle-field-for-backpack)[backpack/revise-operation

Backpack interface for venturecraft/revisionable

43294.4k1](/packages/backpack-revise-operation)[backpack/pagemanager

Create admin panels for presentation websites on Laravel, using page templates and Backpack\\CRUD.

373537.1k6](/packages/backpack-pagemanager)[backpack/backupmanager

Admin interface for managing backups in Backpack, on Laravel 5.2+

336387.0k2](/packages/backpack-backupmanager)

PHPackages © 2026

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