Rest Generic Class
A Laravel package that provides base classes for building RESTful APIs with dynamic filtering, relation loading, and hierarchical data structures.
Key Features
RESTful CRUD
Base classes for Models, Services, and Controllers to build complete CRUD APIs in minutes
Dynamic Filtering
Advanced query filtering with operators, nested conditions, and relation constraints
Relation Loading
Eager load relations with field selection and nested filtering capabilities
Hierarchical Data
Built-in support for tree structures with parent-child relationships
Laravel Cache
Integrated caching with Redis, database, or any Laravel cache driver
Role-Based Access
Field-level restrictions based on Spatie roles and permissions
Bulk Operations
Update multiple records in a single request with validation
Custom Validation
Powerful validation rules for IDs, unique constraints, and pivot tables
Quick Example
Get a working REST API in just three files:Product.php
ProductService.php
ProductController.php
Get Started
Quick Start
Get up and running in 5 minutes with our quickstart guide
Core Concepts
Learn the fundamental concepts behind Rest Generic Class
API Reference
Explore the complete API documentation
Examples
Browse real-world usage examples and scenarios