Invalid Relations
Relation 'x' is not allowed
Relation 'x' is not allowed
Cause: The relation is not listed in Alternatively, you can disable strict mode in
const RELATIONS and filtering.strict_relations is enabled in your configuration.Solution:Add the relation to the RELATIONS constant on your model:config/rest-generic-class.php (not recommended for production):Filter Complexity Limits
"Maximum nesting depth" or "Maximum conditions" errors
"Maximum nesting depth" or "Maximum conditions" errors
Cause: Your
oper filter has exceeded the configured limits:filtering.max_depth(default: 5)filtering.max_conditions(default: 100)
config/rest-generic-class.php:These limits protect your database from abusive queries. Only increase them if you have legitimate use cases requiring complex filters.
Hierarchy Issues
"Invalid hierarchy mode" or hierarchy not supported
"Invalid hierarchy mode" or hierarchy not supported
Cause: Either an invalid Valid modes:
hierarchy.filter_mode was provided, or the model is missing the HIERARCHY_FIELD_ID constant.Solution:- Define the hierarchy field in your model:
- Use a valid hierarchy mode in your request:
match_only- Only matching recordswith_ancestors- Include parent recordswith_descendants- Include child recordsfull_branch- Include ancestors and descendantsroot_filter- Start from root nodes
Export Functionality
Export methods fail (exportExcel/exportPdf)
Export methods fail (exportExcel/exportPdf)
Cause: The optional export packages are not installed. These packages are not included by default.Solution:Install the required packages based on your export needs:For Excel export:For PDF export:Both packages are listed in the
suggest section of composer.json and are only required if you use exportExcel() or exportPdf() methods.Authorization Issues
Spatie authorization fails unexpectedly
Spatie authorization fails unexpectedly
Column Validation Errors
"Invalid column" or column validation errors
"Invalid column" or column validation errors
Cause: Column validation is enabled (default) and you’re attempting to filter or select non-existent columns.Solution:
- Verify the column exists in your database table
- Check for typos in column names (validation is case-sensitive)
- Ensure you’re using the correct table column names, not relation fields
Cache Issues
Stale data or cache not invalidating
Stale data or cache not invalidating
Cause: Cache is enabled but not invalidating properly after write operations.Solution:
- Verify your cache store is configured correctly:
- Clear all cache manually:
- Disable cache for specific requests:
- Check that write operations (create, update, delete) are bumping the model cache version correctly.
The package automatically invalidates cache by bumping a model-level version on any write operation. This avoids stale reads without needing cache tags.
Configuration Cache
Configuration changes not taking effect
Configuration changes not taking effect
Cause: Laravel’s configuration cache is active and needs to be cleared.Solution:Clear the configuration cache:In production, after clearing, rebuild the cache:
Environment variable changes are only reflected in the config file. When config caching is active, you must clear and recache after any .env changes.
Need More Help?
If you’re still experiencing issues:- Check the FAQ for common questions
- Review the Security guide for security-related issues
- Consult the API Reference for detailed method documentation
- Open an issue on GitHub with:
- Your Laravel version
- Package version (from
composer.json) - Error messages and stack traces
- Minimal reproduction steps