tianrosandhy / autocrud-laravel
Admin generator auto CRUD based on Laravel.
Installs: 44
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 2
Type:project
Requires
- php: ^8.0
- doctrine/dbal: ^3.3
- fruitcake/laravel-cors: ^2.0.5
- guzzlehttp/guzzle: ^7.2
- intervention/image: ^2.7
- laravel/framework: ^9.0
- laravel/sanctum: ^2.14
- laravel/tinker: ^2.7
- maatwebsite/excel: ^3.1
- tianrosandhy/autocrud: dev-main
Requires (Dev)
- barryvdh/laravel-debugbar: ^3.6
- fakerphp/faker: ^1.9.1
- laravel/sail: ^1.0.1
- mockery/mockery: ^1.4.4
- nunomaduro/collision: ^6.1
- phpunit/phpunit: ^9.5.10
- spatie/laravel-ignition: ^1.0
- dev-master
- v1.x-dev
- v1.3.3
- v1.3.2
- v1.3.1
- v1.3.0
- v1.2.2
- v1.2.1
- v1.2.0
- v1.1.0
- v1.0.0
- v0.5.1
- v0.5.0
- v0.4.1
- v0.4.0
- v0.3.0
- v0.2.6
- v0.2.5
- v0.2.4
- v0.2.3
- v0.2.2
- v0.2.1
- v0.2.0
- v0.1.3
- v0.1.2
- v0.1.1
- dev-dependabot/composer/guzzlehttp/psr7-2.5.0
- dev-dependabot/composer/symfony/http-kernel-6.0.20
- dev-dev-main
- dev-dev-newfw
- dev-laravel9
This package is auto-updated.
Last update: 2025-03-01 00:31:47 UTC
README
Installation
First you need to install just like default laravel (but with tianrosandhy/autocrud-laravel)
$ composer create-project tianrosandhy/autocrud-laravel $ composer install $ cp .env.example .env $ php artisan key:generate
then setup .env with correct database connection & base APP_URL
$ php artisan migrate $ php artisan storage:link
Last, open via browser for initial setup (superadmin account), then after setup finish, you can open CMS in {base_url}/p4n3lb04rd to access the CMS
Workflow
- Generate module scaffolding
- Register the module service provider to config/modules.php
- Prepare the migration file in modules.
- Generate the datatable & form structure in .app/Modules/{ModuleName}/Http/Structure based on generated migrations (More complete docs will be updated later)
- Setup the sidebar in ./app/Modules/{ModuleName}/Extenders/SidebarGenerator.php
- Override controller or route like usual custom module
Available Command
Generate Superadmin
You must run this command first to activate the CMS :
php artisan autocrud:superadmin
This command will guide you to create an initial superadmin account that have all access in CMS.
Module Scaffolding
You can create module easily with this command :
$ php artisan autocrud:module {Module Name}
$ php artisan autocrud:blankmodule {Module Name}
Note : module name will be generated in PascalCase without space.
autocrud:module is to generate a full auto crud, and autocrud:blankmodule is to generate a module basic scaffolding without autocrud. Blank module is useful when you want to create a really customized module without AutoCRUD scaffolding. Then, you need to register the new module's service provider to config (config/modules.php) :
<?php //config/modules.php return [ 'load' => [ '\App\Modules\ModuleExample\Providers\ModuleExampleServiceProvider', ], ];
After that, you will be able to manage the module in "app/Modules/ModuleExample" for mor customization.
Submodule scaffolding
You can create a submodule easily with this command :
$ php artisan autocrud:submodule {Module Target} {Sub Module Name}
$ php artisan autocrud:blanksubmodule {Module Target} {Sub Module Name}
Note : {Module Target} must be a valid and exists module name. Sub module name will be generated in PascalCase without space.
Same as module scaffolding, but this command will generate a scaffolding in a existing module. So you can group a bunch of module that have a same purpose.