# Star Field for Siberfx 6.x


This package provides a ```star``` field type for the [SiberFx for Laravel](https://siberfx.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

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

## Usage

Inside your custom CrudController:

```php
CRUD::addField([
    '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
    // ],
]);
```
