Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ibrahimbougaoua/filament-rating-star
Filament star rating field & column.
https://github.com/ibrahimbougaoua/filament-rating-star
Last synced: 5 days ago
JSON representation
Filament star rating field & column.
- Host: GitHub
- URL: https://github.com/ibrahimbougaoua/filament-rating-star
- Owner: ibrahimBougaoua
- License: mit
- Created: 2023-08-24T13:13:53.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-10-04T20:10:08.000Z (3 months ago)
- Last Synced: 2024-11-24T19:59:15.460Z (29 days ago)
- Language: Blade
- Homepage:
- Size: 80.1 KB
- Stars: 35
- Watchers: 1
- Forks: 12
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Filament Star rating field & column.
[![Latest Version on Packagist](https://img.shields.io/packagist/v/ibrahimbougaoua/filament-rating-star.svg?style=flat-square)](https://packagist.org/packages/ibrahimbougaoua/filament-rating-star)
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/ibrahimbougaoua/filament-rating-star/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/ibrahimbougaoua/filament-rating-star/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
[![Total Downloads](https://img.shields.io/packagist/dt/ibrahimbougaoua/filament-rating-star.svg?style=flat-square)](https://packagist.org/packages/ibrahimbougaoua/filament-rating-star)Star rating field & Star column.
[](https://www.youtube.com/watch?v=ON3VEyvb96M)## Support us
[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://buymeacoffee.com/ibrahimbougaoua)
Youtube Video
[](https://www.youtube.com/watch?v=ON3VEyvb96M)## Installation
You can install the package via composer:
```bash
composer require ibrahimbougaoua/filament-rating-star
```You can publish the config file with:
```bash
php artisan vendor:publish --tag="filament-rating-star-config"
```This is the contents of the published config file:
```php
return [
'stars' => [
'star1' => '1',
'star2' => '2',
'star3' => '3',
'star4' => '4',
'star5' => '5',
]
];
```Optionally, you can publish the views using
```bash
php artisan vendor:publish --tag="filament-rating-star-views"
```## Usage
With Form :
```php
use IbrahimBougaoua\FilamentRatingStar\Forms\Components\RatingStar;return $form
->schema([
Section::make()
->schema([
RatingStar::make('rating')
->label('Rating')
])
])
```With Table :
```php
use IbrahimBougaoua\FilamentRatingStar\Columns\Components\RatingStar;return $table
->columns([
RatingStar::make('rating')
])
```With Infolist :
```php
use IbrahimBougaoua\FilamentRatingStar\Entries\Components\RatingStar;return $infolist
->schema([
RatingStar::make('rating')
])
```You can use the `size` method to customize the size of the stars:
```php
use IbrahimBougaoua\FilamentRatingStar\Columns\Components\RatingStar;return $table
->columns([
RatingStar::make('rating')
->size('sm')
])
```Supported sizes are `xs`, `sm`, `md`, `lg` and `xl`.
## Testing
```bash
composer test
```## Security Vulnerabilities
Please review [our security policy](../../security/policy) on how to report security vulnerabilities.
## Credits
- [Ibrahim](https://github.com/ibrahimBougaoua)
- [Red Squirrel Studio](https://github.com/redsquirrelstudio)
- [All Contributors](../../contributors)## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.