Developer docs Core 2.2 · Pro 1.x

Search documentation

Search Core and Pro guides, including code examples.

CORE · FREE / MIT

Configuration.

Install the open-source review engine, connect a model, and build your own review experience.

← All Core topics

Configuration

Core's settings live in config/review-rateable.php. This example replaces the department map with two application-specific review contexts:

'user_model' => \App\Models\User::class,

'min_rating_value' => 1,
'max_rating_value' => 5,
'approved_review' => false,

'departments' => [
    'default' => [
        'ratings' => [
            'overall' => 'Overall',
            'quality' => 'Quality',
            'price' => 'Value for money',
        ],
    ],
    'support' => [
        'ratings' => [
            'overall' => 'Overall',
            'speed' => 'Response speed',
            'knowledge' => 'Knowledge',
        ],
    ],
],

Rating keys are stored identifiers; labels are display text. Keep keys stable when changing labels. The selected department determines which criteria are processed. Pro's form requires every displayed criterion.

Set user_model to the model behind your authentication provider. Pro's selected guard and core's user model must use the same numeric identity namespace; overlapping user IDs from unrelated providers are not supported.

approved_review defaults to false. Turn it on only if your application intentionally publishes immediately. Approval is a visibility decision, not a purchase-verification check.

After changing cached production configuration, rebuild your configuration cache using your deployment's normal process.

Core configuration reference

The published file also defines these settings. Keep the existing return [...] array and edit only the entries your application needs:

Setting Default Purpose
user_model App\Models\User::class Model used for review authors; use the same numeric identity namespace as your authentication provider.
min_rating_value, max_rating_value 1, 5 Allowed values for every configured rating criterion. Match your request validation to these bounds.
approved_review false Default publication status for new Core reviews.
departments default, sales, support Department names and their stored rating keys/display labels. Only the selected department's criteria are processed.
images.disk REVIEW_IMAGE_DISK, then FILESYSTEM_DISK, then public Laravel disk for originals and optional thumbnails.
images.directory, images.thumbnail_directory review-images, review-images/thumbnails Base storage paths; Core places files beneath review-specific directories.
images.max_count, images.max_file_size 10, 5120 Per-review image count and per-file size in kilobytes.
images.allowed_mime_types JPEG, PNG, WebP, GIF Accepted upload MIME types; SVG is excluded by default.
images.delete_files_on_delete true Remove stored files after their image or review is deleted.

departments is an application-owned map: the configured keys are stored with ratings, while labels are for display. The photos section covers the separate image migration, storage behavior, and cleanup implications. For the exact shipped defaults, inspect the published config/review-rateable.php after installation.