-
Notifications
You must be signed in to change notification settings - Fork 57
10.0 #647
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
PR Summary
|
* fix: related fields laoded from index * Fix styling * fix: no index in repository * Fix styling * fix: wip * Fix styling * Fix styling * fix: wip --------- Co-authored-by: binaryk <binaryk@users.noreply.github.com>
* fix: adding search using lazy loading for belongs to * Fix styling * Fix styling * fix: wip * fix: wip --------- Co-authored-by: binaryk <binaryk@users.noreply.github.com>
|
|
||
| case 'integer': | ||
| case 'bigint': | ||
| case 'double': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why move?
| if (empty($modelClass)) { | ||
| throw new InvalidArgumentException('Model class cannot be empty'); | ||
| } | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be a good idea to also check that the sent in class string is actually registered / a valid class?
Does it need to be an Eloquent Model?
Version 10.x
🚀 Major Features
Model Context Protocol (MCP) Integration
Laravel Restify now provides seamless integration with the Model Context Protocol (MCP), allowing AI agents to interact with your REST API resources through structured tool interfaces. Transform your repositories into tools for AI agents to consume!
Quick Setup:
Key Benefits: AI-Ready APIs, Zero Configuration, Built-in Security, Web & Terminal Access
📖 Complete MCP Documentation →
Lazy Relationship Loading for Fields
Fields can now be configured to lazy load relationships, preventing N+1 queries for computed attributes:
📖 Lazy Loading Documentation →
JOIN Optimization for BelongsTo Search
Performance optimization replacing slow subqueries with efficient JOIN operations. Enable via configuration:
📖 Performance Optimization Guide →
Repository Index Caching
Powerful caching system for repository index requests that can improve response times by orders of magnitude. Features smart cache key generation, automatic invalidation, and support for all major cache stores.
# Enable in .env RESTIFY_REPOSITORY_CACHE_ENABLED=true RESTIFY_REPOSITORY_CACHE_TTL=300 RESTIFY_REPOSITORY_CACHE_STORE=redisKey Features:
Performance Impact:
📖 Repository Caching Documentation →
Enhanced Field Methods
New and improved field methods with flexible signatures:
searchable()- Unified flexible signature with multiple argument supportmatchable()- Various match types and advanced filtering scenariossortable()- Custom columns and conditional sortingComprehensive Field Validation Methods
Fields now include 60+ validation methods for streamlined form validation without manually writing Laravel validation rules:
Available Methods:
required(),nullable(),email(),numeric(),integer(),boolean(),string(),array(),url(),uuid(),ip(),ipv4(),ipv6(),min(),max(),between(),uniqueRule(),exists(),confirmed(),password(),regex(),size(),accepted(),json(),alpha(),alphaNum(),alphaDash(),date(),datetime(),dateFormat(),after(),afterOrEqual(),before(),beforeOrEqual(),different(),same(),filled(),present(),isFile(),isImage(),in(),notIn(),requiredIf(),requiredUnless(),requiredWith(),requiredWithAll(),requiredWithout(),requiredWithoutAll(),multipleOf(),timezone(),currentPassword(),macAddress(),endsWith(),startsWith()Custom Search Callbacks for BelongsTo Relations
BelongsTo fields now support custom search callbacks for complete control over search behavior:
The callback receives all necessary parameters with the query as the first parameter for maximum flexibility.
📖 Field Methods Documentation →
Default Search Behavior Change
Repositories no longer search by primary key (ID) by default when no searchable fields are defined.
Migration Path:
📖 Complete Migration Guide →
🔧 Technical Improvements
📚 Documentation & Resources