Download the PHP package ghazym/laravel-module-suite without Composer
On this page you can find all versions of the php package ghazym/laravel-module-suite. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ghazym/laravel-module-suite
More information about ghazym/laravel-module-suite
Files in ghazym/laravel-module-suite
Package laravel-module-suite
Short Description A comprehensive Laravel package for building modular applications with RBAC, media management, and API endpoints
License MIT
Informations about the package laravel-module-suite
Laravel Module Suite
A comprehensive Laravel package for building modular applications with RBAC, media management, and API endpoints.
Prerequisites
Before using this package, ensure you have:
- Laravel 9.x, 10.x, 11.x, or 12.x installed
- For Laravel 11.x or higher, you need to install the API package:
Features
- Role-Based Access Control (RBAC) with polymorphic relationships
- Media management with file uploads and storage
- Custom module generation
- Permission management
- API endpoints for roles and permissions
- Repository pattern implementation
- Standardized API responses
Requirements
- PHP >= 8.1
- Laravel >= 10.0
- Composer
Installation
Publish the configuration and migrations:
Run the migrations:
Seed the default permissions and roles:
Module Generation
Generate a new module with all necessary files:
This command will create:
- Controller with API endpoints
- Model with relationships
- Service class for business logic
- Form Request classes for validation
- API Resource for handling list and detail views
- Migration file
- Seeder file
- Repository trait for data access
- Response trait for standardized API responses
Usage
Roles and Permissions
The package provides a polymorphic role system that can be used with any model:
Assigning Roles
Checking Permissions
Media Management
The package includes a media management system with automatic file cleanup:
Managing Media
Configuration
The package is highly configurable through the config/laravel-module-suite.php file:
Repository Query Parameters
You can customize queries when using the repository helpers by passing an array of parameters. The trait already supports select, relations, various where* clauses, searching, ordering, etc. Here are a few examples showing the new options you've added:
These options correspond directly to the conditions handled in RepositoryTrait::buildQuery().
API Routes
The package provides the following API endpoints:
Security
- All file uploads are validated for size and type
- Files are stored in appropriate disks based on type
- Automatic cleanup of files when models are deleted
- Role and permission checks are enforced through middleware
When you run make:module, it creates:
API Response Format
All API responses follow a consistent format:
License
This package is open-sourced software licensed under the MIT license.