kosmoskosmos / rating

Allows multiple models to be rated with a five-star like system on Laravel Nova


Laravel Nova Rateable Field Extension


This package introduces a Rateable Trait to your application's models on Laravel Nova.

This package introduces a Rateable Trait to your application's models.

Also, it introduces an interactive Field to your Nova backend that makes it possible to instantly rate any property you wish.

With this package it is possible to perform multiple category rating.

For example, you might want to rate the

  • Performance
  • Price
  • Quality

of a product.

However, you can also generate a field that returns the average rating over all three categories combined with the virtual attribute averageRating


Thank you for doing the base work:


Special credits

Thank you for inspiring us:


If you need some more documentation about possible options, this might be a good documentation resource.


  1. composer require kosmoskosmos/nova-rateable-field
  2. php artisan vendor:publish
  3. php artisan migrate


public function fields(Request $request)
    return [
        // ...
        // Define categories for to be rated.
        Rating::make('Pizza Baking Skills', 'pizza')->hideFromIndex(),
        Rating::make('Sushi Rolling Skills',  'sushi')->hideFromIndex(),
        Rating::make('Bread Baking Skills', 'bread')->hideFromIndex(),
        // Show average rating from all three categories above.  
        Rating::make('Overall Skills', 'average_rating')->onlyOnIndex(), 
        // ...