Download the PHP package swattech/crud without Composer
On this page you can find all versions of the php package swattech/crud. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download swattech/crud
More information about swattech/crud
Files in swattech/crud
Informations about the package crud
SwatTech CRUD for Laravel 12
SwatTech CRUD is an enterprise-grade CRUD generator for Laravel 12 with Vuexy theme integration. It analyzes your database schema and automatically detects relationships, generating feature-rich code with a single command.
๐ Comprehensive Features
Core Generation
- ๐ Complete CRUD Operations - Models, controllers, repositories, services, views, and routes
- ๐ Smart Relationship Detection - Auto-detects and implements all relationship types
- ๐งฉ Repository Pattern - Clean, maintainable code structure with caching implementation
- ๐ฑ Responsive Views - Mobile-friendly interfaces with Vuexy theme components
- ๐งช Test Suite Generation - Unit, feature, API, and browser tests with realistic data
Advanced Features
- ๐ Smart Validation - Form request classes with context-aware rules based on schema
- ๐ Powerful Filtering - Advanced search, column filtering, and custom scopes
- ๐ Data Export - CSV, Excel, PDF export with customizable formatting
- ๐ Authorization - Policy generation with ownership checks and role integration
- ๐ก API Resources - RESTful API endpoints with proper resources and transformers
- ๐ Documentation - Auto-generated API and usage documentation
Enterprise Features
- ๐ Activity Logging - Comprehensive audit trail system for all operations
- ๐ Media Management - File upload and management with preview support
- ๐ Soft Deletes - Trash management with restore capabilities
- ๐ Internationalization - Multi-language support with translation management
- ๐ Batch Operations - Process records in bulk with progress tracking
- ๐ Versioning - Track changes with version history and comparison
UI Components
- ๐ Data Tables - Sortable, filterable data tables with pagination
- ๐ Tabs & Cards - Organized content with tabbed interfaces
- ๐ Advanced Filters - Date ranges, multi-select filters, saved queries
- ๐ค Export Buttons - One-click data export to multiple formats
- ๐ Rich Forms - Date pickers, wysiwyg editors, select2 dropdowns
- ๐ Notifications - User notification system with real-time updates
๐ง Installation
Prerequisites
- PHP 8.1 or higher
- Laravel 12.x
- Composer 2.0+
- Database connection configured in your .env file
Step 1: Install via Composer
Step 2: Publish Configuration
Step 3: Publish Assets (Optional)
Step 4: Run Migrations (Optional)
Only needed if you want to use activity logging, media, etc.
โ๏ธ Configuration
The package is highly customizable through the config/crud.php
file:
๐ Usage Examples
Generate Complete CRUD
Generate all files for a table:
This will create:
- Model with relationships
- Repository and Service classes
- Controller with CRUD actions
- Form Request validation classes
- Blade views with Vuexy theme
- Routes in web.php
- Factory and Seeder
- Policy for authorization
- Tests for all components
Generate API Only
Create API endpoints and resources:
Generate with Specific Options
Customize the generation process:
Generate for Multiple Tables
Process all tables in your database:
Generate Only Relationships
Add relationship methods to existing models:
Generate Documentation
Create comprehensive documentation:
๐ Command Reference
crud:generate
crud:api
Generate API-specific components:
crud:relationships
Analyze and generate relationships:
crud:docs
Generate comprehensive documentation:
crud:tests
Generate test suite:
๐ Extending and Customizing
Custom Generators
Extend the base generator classes to customize the code generation:
Register your custom generator in a service provider:
Custom Stubs
Publish and edit the stub templates:
Edit the stubs in resources/stubs/vendor/swattech/crud/
:
- Controllers:
controller.stub
,api_controller.stub
- Models:
model.stub
- Views:
views/index.blade.stub
,views/create.blade.stub
, etc. - And many more...
Custom Themes
The package comes with Vuexy theme integration by default, but you can create your own theme:
- Publish the stubs:
php artisan vendor:publish --tag="stubs"
- Create a new theme directory:
resources/stubs/vendor/swattech/crud/mytheme/
- Add your theme files (layout.stub, views/, components/)
- Update configuration:
'theme' => ['name' => 'mytheme']
โ Troubleshooting
Class Not Found Errors
Permission Issues
Database Connection Issues
Make sure your .env
file has the correct database configuration:
JavaScript/CSS Assets Not Found
Relationship Detection Issues
If relationships aren't detected properly:
Customizing Generated Code
To make minor changes without extending classes:
- Publish the config:
php artisan vendor:publish --tag="config"
- Publish the stubs:
php artisan vendor:publish --tag="stubs"
- Edit the appropriate stub files
- Update the config to use custom stubs:
'stubs' => ['use_custom' => true]
๐ License
The SwatTech CRUD package is open-sourced software licensed under the MIT license.
๐ฅ Contributing
We welcome contributions to improve SwatTech CRUD! Please follow these steps:
- Fork the repository
- Create a feature branch:
git checkout -b feature-name
- Commit your changes:
git commit -m 'Add feature'
- Push to the branch:
git push origin feature-name
- Submit a pull request
Please make sure your code follows our coding standards and includes appropriate tests.
๐ฆ Credits
- Developed by Swat Info System
- Made with โค๏ธ for Laravel developers
All versions of crud with dependencies
laravel/framework Version ^10.0|^11.0|^12.0
doctrine/dbal Version ^3.7
illuminate/support Version ^12.0
illuminate/database Version ^12.0
illuminate/console Version ^12.0
illuminate/filesystem Version ^12.0
illuminate/contracts Version ^12.0
illuminate/events Version ^12.0
nesbot/carbon Version ^2.0
spatie/laravel-permission Version ^5.0
barryvdh/laravel-ide-helper Version ^3.0
maatwebsite/excel Version ^3.1
barryvdh/laravel-dompdf Version ^2.0
phpoffice/phpspreadsheet Version ^4.0
darkaonline/l5-swagger Version ^8.0
league/csv Version ^9.0
laravel/scout Version ^10.0
league/flysystem Version ^3.0
ramsey/uuid Version ^4.0
ext-json Version *
ext-pdo Version *