thereline / crudmaster
A laravel package for easy CRUD generation. Generate models, repositories, services, controllers, and views effortlessly with customizable options for Blade or Vue.
Fund package maintenance!
thereline
Requires
- php: ^8.2
- illuminate/contracts: ^10.0||^11.0
- inertiajs/inertia-laravel: ^1.3
- laravel/prompts: ^0.3.2
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- larastan/larastan: ^2.9
- laravel/pint: ^1.14
- nunomaduro/collision: ^8.0
- orchestra/testbench: ^9.0.0||^8.22.0
- pestphp/pest: ^3.0
- pestphp/pest-plugin-arch: ^3.0
- pestphp/pest-plugin-laravel: ^3.0
- phpstan/extension-installer: ^1.3
- phpstan/phpstan-deprecation-rules: ^1.1
- phpstan/phpstan-phpunit: ^1.3
This package is auto-updated.
Last update: 2024-12-26 14:36:02 UTC
README
A Laravel package for easy CRUD generation. Generate models, repositories, services, controllers, and views effortlessly with customizable options for Blade or Vue.
CrudMaster is a powerful and flexible Laravel package designed to simplify the process of generating CRUD (Create, Read, Update, Delete) operations for any model. With CrudMaster, developers can quickly scaffold complete CRUD functionality, including models, repositories, action services, controllers, and views, saving time and reducing repetitive tasks.
Key Features:
Artisan Command: Easily generate CRUD operations using a single Artisan command.
Customizable Views: Choose between Blade or Vue.js for your front-end views.
Repository Pattern: Implements the repository pattern for clean and maintainable code.
Action Services: Encapsulate business logic in service classes for better code organization.
Automatic Migrations: Automatically generate and run migrations for your models.
Support us
We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.
We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.
Installation
- Require the package via composer: You can install the package via composer:
composer require thereline/crudmaster
- Required for Front end styling
npm install vite
npm install tailwindcss
- Require for CrudMaster Tables
- install lodash for debounce.
npm install lodash
- install vue-virtual-scroller rendering the visible rows only:
npm install vue-virtual-scroller
- install vue3-dragula for drag-and-drop functionality.
npm install vue3-dragula
- We'll use papaparse for CSV parsing.
npm install papaparse
- Requirement for CrudMaster Forms
npm install @headlessui/vue @inertiajs/inertia @inertiajs/inertia-vue3 yup
- Form validation and validation rules
npm install @vuelidate/core @vuelidate/validators
- Add dark mode support using Tailwind's dark mode feature.
Update tailwind.config.js:
module.exports = { darkMode: 'class', // Enable dark mode support //rest of the code }
- Requirements for CrudPanels
npm install vue vue-router vuex @inertiajs/inertia @inertiajs/inertia-vue3 tailwindcss @headlessui/vue i18next i18next-browser-languagedetector i18next-http-backend
- Publish the assets:
- You can publish provider with:
php artisan vendor:publish --tag=crudmaster-providers
- You should merge package's package.json with main package.json with:
php artisan crudmaster:merge-package-json
- You can publish and run the migrations with:
php artisan vendor:publish --tag="crudmaster-migrations" php artisan migrate
You can publish the config file with:
php artisan vendor:publish --tag="crudmaster-config"
This is the contents of the published config file:
return [
];
Optionally, you can publish the views using
php artisan vendor:publish --tag="crudmaster-views"
Optionally, you can publish the translations using
php artisan vendor:publish --tag=your-package-name-translations
- Install the npm dependencies:
npm install
- Build the assets:
npm run dev
Usage
$crudMaster = new Thereline\CrudMaster(); echo $crudMaster->echoPhrase('Hello, Thereline!');
- Generate CRUD:
php artisan crudmaster:generate ModelName --columns=name,email,password --views=blade
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.