Download the PHP package ahmed-aliraqi/crud-generator without Composer
On this page you can find all versions of the php package ahmed-aliraqi/crud-generator. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ahmed-aliraqi/crud-generator
More information about ahmed-aliraqi/crud-generator
Files in ahmed-aliraqi/crud-generator
Package crud-generator
Short Description This package is a useful tool to generate simple crud for laravel-modules/scaffolding
License MIT
Informations about the package crud-generator
CRUD. Generator
Introduction
This package is a useful tool to generate simple crud for laravel-modules/scaffolding
the files that will be generated is:
- Lang Files (ar & en)
- Breadcrumb File
- View Files
- Api Resource Files
- Migration Files
- Factory File
- Policy Files
- Controller Files
- Model Files
- Request Files
- Filter Files
- Test Files
Installation
Configuration
You should add config file using the following command to configure the supported resources.
Then add the following comment line in the routes/dashboard.php and routes/api.php files:
And the follwing comment line in the resources/views/layouts/sidebar.blade.php file:
Usage
For example if you want to generate a new CRUD named category. make sure it's arabic words was defined in arabicWords of config file and then use the following artisan command:
Use translatable option if the CRUD is translatable:
Use has-media option if the CRUD has media:
Also you can use both options together to generate translatable and has media CRUD.
Account Type Cloner
This command will clone
customeraccount type to another type namedmerchant,
Some files should be modified manually like:
- add constant for the newly generated type in
app/Models/User.php
Then register the type in childTypes array:
-
Add check for type helper in
app/Models/Helpers/UserHelper.php: -
Add seeders in
database/seeders/UserSeeder.php: -
Add translation lang file name to
config/lang-generator.php - Update arabic translations in lang file for generated type
lang/ar/merchants.php -
Add type translated key into
lang/{lang}/users.php: - Clone view files in dashboard from
customerdirectory tomerchantand replace allcustomerword tomerchantCustomer=>Merchantcustomers=>merchantscustomer=>merchant
-
Add Sidebar link in
resources/views/dashboard/accounts/sidebar.blade.php: -
Add the routes for the newly generated type in
routes/dashboard.phpfile: -
Add route binding in
storage/soft_deletes_route_binding.json: -
Add the permision in
storage/permissions.json: - Add
actingAsMerchanthelper intotests/TestCase.php
All versions of crud-generator with dependencies
illuminate/support Version >=9.0
illuminate/console Version >=9.0
laravel-modules/module-generator Version ^3.2
laravel/prompts Version ^0.3.8