Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: CrestApps/laravel-code-generator
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.4.5
Choose a base ref
...
head repository: CrestApps/laravel-code-generator
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
Loading
Showing with 24,508 additions and 3,536 deletions.
  1. +13 −0 .github/FUNDING.yml
  2. +34 −0 .github/workflows/deploy.yml
  3. +3 −0 .gitignore
  4. +1 −1 CHANGELOG.md
  5. +1 −0 CNAME
  6. +95 −107 README.md
  7. +1 −1 composer.json
  8. +37 −42 config/default.php
  9. +2 −2 config/laravel-code-generator.php
  10. +20 −0 docs/.gitignore
  11. +41 −0 docs/README.md
  12. +3 −0 docs/babel.config.js
  13. +593 −0 docs/docs/available-commands.md
  14. +20 −0 docs/docs/configurations.md
  15. +47 −0 docs/docs/get-started.md
  16. +53 −0 docs/docs/intro.md
  17. +10 −0 docs/docs/release-notes.md
  18. +318 −0 docs/docs/resource-file.md
  19. +8 −0 docs/docs/upgrade-guide.md
  20. +119 −0 docs/docusaurus.config.js
  21. +14,883 −0 docs/package-lock.json
  22. +44 −0 docs/package.json
  23. +33 −0 docs/sidebars.js
  24. +64 −0 docs/src/components/HomepageFeatures/index.js
  25. +11 −0 docs/src/components/HomepageFeatures/styles.module.css
  26. +36 −0 docs/src/css/custom.css
  27. +42 −0 docs/src/pages/index.js
  28. +23 −0 docs/src/pages/index.module.css
  29. 0 docs/static/.nojekyll
  30. BIN docs/static/img/crestapps-logo.png
  31. BIN docs/static/img/favicon.ico
  32. +577 −0 docs/versioned_docs/version-2.0.0/available-commands.md
  33. +12 −0 docs/versioned_docs/version-2.0.0/configurations.md
  34. +41 −0 docs/versioned_docs/version-2.0.0/get-started.md
  35. +62 −0 docs/versioned_docs/version-2.0.0/intro.md
  36. +36 −0 docs/versioned_docs/version-2.0.0/laravel-collective.md
  37. +103 −0 docs/versioned_docs/version-2.0.0/release-notes.md
  38. +318 −0 docs/versioned_docs/version-2.0.0/resource-file.md
  39. +16 −0 docs/versioned_docs/version-2.0.0/upgrade-guide.md
  40. +577 −0 docs/versioned_docs/version-2.1.0/available-commands.md
  41. +12 −0 docs/versioned_docs/version-2.1.0/configurations.md
  42. +42 −0 docs/versioned_docs/version-2.1.0/get-started.md
  43. +62 −0 docs/versioned_docs/version-2.1.0/intro.md
  44. +36 −0 docs/versioned_docs/version-2.1.0/laravel-collective.md
  45. +103 −0 docs/versioned_docs/version-2.1.0/release-notes.md
  46. +318 −0 docs/versioned_docs/version-2.1.0/resource-file.md
  47. +16 −0 docs/versioned_docs/version-2.1.0/upgrade-guide.md
  48. +577 −0 docs/versioned_docs/version-2.2.0/available-commands.md
  49. +12 −0 docs/versioned_docs/version-2.2.0/configurations.md
  50. +42 −0 docs/versioned_docs/version-2.2.0/get-started.md
  51. +62 −0 docs/versioned_docs/version-2.2.0/intro.md
  52. +36 −0 docs/versioned_docs/version-2.2.0/laravel-collective.md
  53. +103 −0 docs/versioned_docs/version-2.2.0/release-notes.md
  54. +318 −0 docs/versioned_docs/version-2.2.0/resource-file.md
  55. +16 −0 docs/versioned_docs/version-2.2.0/upgrade-guide.md
  56. +577 −0 docs/versioned_docs/version-2.3.0/available-commands.md
  57. +12 −0 docs/versioned_docs/version-2.3.0/configurations.md
  58. +42 −0 docs/versioned_docs/version-2.3.0/get-started.md
  59. +62 −0 docs/versioned_docs/version-2.3.0/intro.md
  60. +36 −0 docs/versioned_docs/version-2.3.0/laravel-collective.md
  61. +103 −0 docs/versioned_docs/version-2.3.0/release-notes.md
  62. +318 −0 docs/versioned_docs/version-2.3.0/resource-file.md
  63. +16 −0 docs/versioned_docs/version-2.3.0/upgrade-guide.md
  64. +588 −0 docs/versioned_docs/version-2.4.0/available-commands.md
  65. +12 −0 docs/versioned_docs/version-2.4.0/configurations.md
  66. +42 −0 docs/versioned_docs/version-2.4.0/get-started.md
  67. +62 −0 docs/versioned_docs/version-2.4.0/intro.md
  68. +36 −0 docs/versioned_docs/version-2.4.0/laravel-collective.md
  69. +19 −0 docs/versioned_docs/version-2.4.0/release-notes.md
  70. +318 −0 docs/versioned_docs/version-2.4.0/resource-file.md
  71. +8 −0 docs/versioned_docs/version-2.4.0/upgrade-guide.md
  72. +593 −0 docs/versioned_docs/version-3.0.x/available-commands.md
  73. +20 −0 docs/versioned_docs/version-3.0.x/configurations.md
  74. +47 −0 docs/versioned_docs/version-3.0.x/get-started.md
  75. +53 −0 docs/versioned_docs/version-3.0.x/intro.md
  76. +10 −0 docs/versioned_docs/version-3.0.x/release-notes.md
  77. +318 −0 docs/versioned_docs/version-3.0.x/resource-file.md
  78. +8 −0 docs/versioned_docs/version-3.0.x/upgrade-guide.md
  79. +8 −0 docs/versioned_sidebars/version-2.0.0-sidebars.json
  80. +8 −0 docs/versioned_sidebars/version-2.1.0-sidebars.json
  81. +8 −0 docs/versioned_sidebars/version-2.2.0-sidebars.json
  82. +8 −0 docs/versioned_sidebars/version-2.3.0-sidebars.json
  83. +8 −0 docs/versioned_sidebars/version-2.4.0-sidebars.json
  84. +8 −0 docs/versioned_sidebars/version-3.0.x-sidebars.json
  85. +8 −0 docs/versions.json
  86. +6 −0 package-lock.json
  87. +1 −6 src/CodeGeneratorServiceProvider.php
  88. +10 −7 src/Commands/Api/CreateApiControllerCommand.php
  89. +19 −40 src/Commands/Api/CreateApiResourceCommand.php
  90. +9 −6 src/Commands/Api/CreateApiScaffoldCommand.php
  91. +5 −5 src/Commands/ApiDocs/CreateApiDocsControllerCommand.php
  92. +9 −6 src/Commands/ApiDocs/CreateApiDocsScaffoldCommand.php
  93. +11 −11 src/Commands/ApiDocs/CreateApiDocsViewCommand.php
  94. +15 −15 src/Commands/Bases/ControllerCommandBase.php
  95. +11 −7 src/Commands/Bases/ControllerRequestCommandBase.php
  96. +1 −1 src/Commands/Bases/ResourceFileCommandBase.php
  97. +10 −18 src/Commands/Bases/ViewsCommandBase.php
  98. +2 −2 src/Commands/Framework/CreateControllerCommand.php
  99. +4 −4 src/Commands/Framework/CreateFormRequestCommand.php
  100. +5 −5 src/Commands/Framework/CreateLanguageCommand.php
  101. +5 −5 src/Commands/Framework/CreateMappedResourcesCommand.php
  102. +7 −7 src/Commands/Framework/CreateMigrationCommand.php
  103. +11 −9 src/Commands/Framework/CreateModelCommand.php
  104. +5 −5 src/Commands/Framework/CreateResourcesCommand.php
  105. +5 −6 src/Commands/Framework/CreateRoutesCommand.php
  106. +4 −4 src/Commands/Framework/CreateScaffoldCommand.php
  107. +4 −4 src/Commands/Resources/ResourceFileAppendCommand.php
  108. +4 −4 src/Commands/Resources/ResourceFileCreateCommand.php
  109. +4 −4 src/Commands/Resources/ResourceFileFromDatabaseCommand.php
  110. +3 −3 src/Commands/Resources/ResourceFileReduceCommand.php
  111. +1 −1 src/Commands/Resources/ResourceFileRefreshCommand.php
  112. +3 −2 src/Commands/Views/CreateCreateViewCommand.php
  113. +2 −2 src/Commands/Views/CreateEditViewCommand.php
  114. +2 −1 src/Commands/Views/CreateFormViewCommand.php
  115. +62 −0 src/Commands/Views/CreateIndexViewCommand.php
  116. +1 −3 src/Commands/Views/CreateLayoutCommand.php
  117. +5 −8 src/Commands/Views/CreateViewLayoutCommand.php
  118. +2 −2 src/DatabaseParsers/MysqlParser.php
  119. +4 −4 src/DatabaseParsers/ParserBase.php
  120. +5 −5 src/DatabaseParsers/SqlServerParser.php
  121. +51 −51 src/HtmlGenerators/HtmlGeneratorBase.php
  122. +2 −2 src/HtmlGenerators/LaravelCollectiveHtml.php
  123. +4 −4 src/HtmlGenerators/StandardHtml.php
  124. +1 −1 src/Models/ForeignRelationship.php
  125. +1 −0 src/Models/IndexMigrationChange.php
  126. +2 −2 src/Models/Label.php
  127. +1 −1 src/Models/MigrationCapsule.php
  128. +1 −1 src/Models/MigrationChangeCapsule.php
  129. +2 −2 src/Models/MigrationInput.php
  130. +3 −3 src/Models/MigrationTrackerCapsule.php
  131. +10 −10 src/Models/Resource.php
  132. +2 −2 src/Models/ViewInput.php
  133. +5 −5 src/Support/Arr.php
  134. +1 −11 src/Support/Config.php
  135. +3 −3 src/Support/FieldOptimizer.php
  136. +5 −5 src/Support/FieldTransformer.php
  137. +2 −2 src/Support/FieldsOptimizer.php
  138. +28 −3 src/Support/Helpers.php
  139. +2 −2 src/Support/MigrationHistoryTracker.php
  140. +3 −3 src/Support/Str.php
  141. +5 −5 src/Support/ValidationParser.php
  142. +1 −23 src/Support/ViewLabelsGenerator.php
  143. +1 −1 src/Traits/ApiDocViewsTrait.php
  144. +3 −4 src/Traits/ApiResourceTrait.php
  145. +7 −19 src/Traits/CommonCommand.php
  146. +4 −4 src/Traits/GeneratorReplacers.php
  147. +1 −1 src/Traits/LanguageTrait.php
  148. +2 −1 src/Traits/Migration.php
  149. +1 −1 src/Traits/ScaffoldTrait.php
  150. +0 −15 templates/default-collective/api-controller-base-class.stub
  151. +0 −1 templates/default-collective/api-controller-call-destroy-api-resource.stub
  152. +0 −4 templates/default-collective/api-controller-call-destroy-success-method.stub
  153. +0 −1 templates/default-collective/api-controller-call-index-api-resource.stub
  154. +0 −26 templates/default-collective/api-controller-call-index-success-method.stub
  155. +0 −1 templates/default-collective/api-controller-call-show-api-resource.stub
  156. +0 −4 templates/default-collective/api-controller-call-show-success-method.stub
  157. +0 −1 templates/default-collective/api-controller-call-store-api-resource.stub
  158. +0 −4 templates/default-collective/api-controller-call-store-success-method.stub
  159. +0 −1 templates/default-collective/api-controller-call-update-api-resource.stub
  160. +0 −4 templates/default-collective/api-controller-call-update-success-method.stub
  161. +0 −14 templates/default-collective/api-controller-error-response-method.stub
  162. +0 −16 templates/default-collective/api-controller-get-validator.stub
  163. +0 −18 templates/default-collective/api-controller-success-response-method.stub
  164. +0 −13 templates/default-collective/api-controller-transform-method.stub
  165. +0 −5 templates/default-collective/api-controller-validate.stub
  166. +0 −104 templates/default-collective/api-controller.stub
  167. +0 −21 templates/default-collective/api-documentation-controller-version-based.stub
  168. +0 −20 templates/default-collective/api-documentation-controller.stub
  169. +0 −1 templates/default-collective/api-documentation-field-validation-required.stub
  170. +0 −11 templates/default-collective/api-documentation-index-authentication.stub
  171. +0 −16 templates/default-collective/api-documentation-index-failed-authentication.stub
  172. +0 −16 templates/default-collective/api-documentation-index-failed-to-retrieve.stub
  173. +0 −16 templates/default-collective/api-documentation-index-failed-validation.stub
  174. +0 −5 templates/default-collective/api-documentation-index-fields-list-body-row-for-model.stub
  175. +0 −12 templates/default-collective/api-documentation-index-fields-list-body-row.stub
  176. +0 −37 templates/default-collective/api-documentation-index-fields-list.stub
  177. +0 −14 templates/default-collective/api-documentation-index-request.stub
  178. +0 −5 templates/default-collective/api-documentation-index-retrieved-fields-body-row.stub
  179. +0 −12 templates/default-collective/api-documentation-index-retrieved-fields.stub
  180. +0 −21 templates/default-collective/api-documentation-index-retrieved.stub
  181. +0 −417 templates/default-collective/api-documentation-index.stub
  182. +0 −2 templates/default-collective/api-documentation-routes-8.stub
  183. +0 −2 templates/default-collective/api-documentation-routes.stub
  184. +0 −38 templates/default-collective/api-documentation-version-based-base-controller.stub
  185. +0 −50 templates/default-collective/api-resource-collection.stub
  186. +0 −59 templates/default-collective/api-resource.stub
  187. +0 −10 templates/default-collective/api-routes-8.stub
  188. +0 −10 templates/default-collective/api-routes.stub
  189. +0 −17 templates/default-collective/controller-affirm-method.stub
  190. +0 −10 templates/default-collective/controller-constructor.stub
  191. +0 −21 templates/default-collective/controller-getdata-method-5.5.stub
  192. +0 −15 templates/default-collective/controller-getdata-method.stub
  193. +0 −20 templates/default-collective/controller-upload-method-5.3.stub
  194. +0 −20 templates/default-collective/controller-upload-method.stub
  195. +0 −138 templates/default-collective/controller.stub
  196. +0 −56 templates/default-collective/create.blade.stub
  197. +0 −58 templates/default-collective/edit.blade.stub
  198. +0 −20 templates/default-collective/form-file-field.blade.stub
  199. +0 −1 templates/default-collective/form-helper-field.blade.stub
  200. +0 −1 templates/default-collective/form-input-field.blade.stub
  201. +0 −8 templates/default-collective/form-input-wrapper.blade.stub
  202. +0 −1 templates/default-collective/form-label-field.blade.stub
  203. +0 −1 templates/default-collective/form-month-field.blade.stub
  204. +0 −1 templates/default-collective/form-nolabel-field.blade.stub
  205. +0 −1 templates/default-collective/form-password-field.blade.stub
  206. +0 −6 templates/default-collective/form-pickitems-field.blade.stub
  207. +0 −4 templates/default-collective/form-pickitems-inline-field.blade.stub
  208. +0 −35 templates/default-collective/form-request.stub
  209. +0 −1 templates/default-collective/form-selectmenu-field.blade.stub
  210. +0 −1 templates/default-collective/form-selectrange-field.blade.stub
  211. +0 −1 templates/default-collective/form-textarea-field.blade.stub
  212. +0 −1 templates/default-collective/form.blade.stub
  213. +0 −96 templates/default-collective/index.blade.stub
  214. +0 −1 templates/default-collective/index.body.cell.blade.stub
  215. +0 −1 templates/default-collective/index.header.cell.blade.stub
  216. +0 −5 templates/default-collective/language.stub
  217. +0 −182 templates/default-collective/layout-with-validation.stub
  218. +0 −149 templates/default-collective/layout.stub
  219. +0 −10 templates/default-collective/login-partial.stub
  220. +0 −1 templates/default-collective/migration-schema-down.stub
  221. +0 −4 templates/default-collective/migration-schema-up.stub
  222. +0 −27 templates/default-collective/migration.stub
  223. +0 −1 templates/default-collective/model-accessor-datetime.stub
  224. +0 −1 templates/default-collective/model-accessor-multiple-answers.stub
  225. +0 −10 templates/default-collective/model-accessor.stub
  226. +0 −1 templates/default-collective/model-mutator-datetime.stub
  227. +0 −1 templates/default-collective/model-mutator-multiple-answers.stub
  228. +0 −10 templates/default-collective/model-mutator.stub
  229. +0 −6 templates/default-collective/model-primary-key.stub
  230. +0 −9 templates/default-collective/model-relation.stub
  231. +0 −6 templates/default-collective/model-timestamps.stub
  232. +0 −44 templates/default-collective/model.stub
  233. +0 −14 templates/default-collective/routes-8.stub
  234. +0 −6 templates/default-collective/routes-group.stub
  235. +0 −14 templates/default-collective/routes.stub
  236. +0 −54 templates/default-collective/show.blade.stub
  237. +0 −2 templates/default-collective/show.row.blade.stub
  238. +0 −30 templates/default-collective/view-model.stub
  239. +323 −354 templates/default/api-documentation-index.stub
  240. +1 −1 templates/default/controller-upload-method-5.3.stub
  241. +1 −1 templates/default/controller-upload-method.stub
  242. +20 −32 templates/default/controller.stub
  243. +17 −21 templates/default/create.blade.stub
  244. +18 −23 templates/default/edit.blade.stub
  245. +10 −16 templates/default/form-file-field.blade.stub
  246. +1 −1 templates/default/form-helper-field.blade.stub
  247. +1 −1 templates/default/form-input-field.blade.stub
  248. +2 −2 templates/default/form-input-wrapper.blade.stub
  249. +1 −1 templates/default/form-label-field.blade.stub
  250. +1 −1 templates/default/form-month-field.blade.stub
  251. +1 −1 templates/default/form-nolabel-field.blade.stub
  252. +1 −1 templates/default/form-password-field.blade.stub
  253. +4 −4 templates/default/form-pickitems-field.blade.stub
  254. +6 −4 templates/default/form-pickitems-inline-field.blade.stub
  255. +1 −1 templates/default/form-selectmenu-field.blade.stub
  256. +1 −1 templates/default/form-selectrange-field.blade.stub
  257. +1 −1 templates/default/form-textarea-field.blade.stub
  258. +16 −27 templates/default/index.blade.stub
  259. +1 −1 templates/default/index.body.cell.blade.stub
  260. +0 −182 templates/default/layout-with-validation.stub
  261. +184 −139 templates/default/layout.stub
  262. +50 −0 templates/default/pagination.blade.stub
  263. +1 −1 templates/default/routes-8.stub
  264. +24 −30 templates/default/show.blade.stub
  265. +2 −2 templates/default/show.row.blade.stub
13 changes: 13 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# These are supported funding model platforms

github: malhayek
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
34 changes: 34 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
on:
workflow_dispatch:
push:
branches:
- master
paths:
- docs/**

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4

- name: Install dependencies
run: npm install
working-directory: ./docs

- name: Build site
run: npm run build
working-directory: ./docs

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages # Branch where your GitHub Pages content will be deployed
publish_dir: ./docs/build # Path to the build output folder
cname: crestapps.github.io
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -2,3 +2,6 @@
.DS_Store
vendor/
composer.lock

.vscode/
.node_modules/
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@
- The `create:routes` command now has a new option `without-route-clause` which will create the routes without `there` clause for the id. It may be used when the primary key is not an integer. Additionally, the options `--for-api` and `--api-version` have been added to add support for created api-based routes.
- added command to create api-resource with/without collection when using Laravel 5.5+.
- The `create:api-scaffold` command have been added to allow you to create resources for the api.
- The user is no longer required to publish the default templates. This is much better step to prevent upgrade braking when the template are updated during a patch release. The user should publish templates only if he/she want to modify it and rename it. **IMPORTANT** Delete existing default and default-collective templates from the folders from the default publish path of your project.
- The user is no longer required to publish the default templates. This is much better step to prevent upgrade braking when the template are updated during a patch release. The user should publish templates only if he/she want to modify it and rename it. **IMPORTANT** Delete existing `default` templates from the folders from the default publish path of your project.
- The user no longer have to publish resource to install the package! One line only is required to install the package on laravel 5.5+ (i.e, composer require crestapps/laravel-code-generator --dev)
- **IMPORTANT**: delete the the `codegenerator.php` file from your config folder, then rename the `codegenerator_custom.php` file to `laravel-code-generator.php`. Alternatively, you can delete both `codegenerator.php` and `codegenerator_custom.php`
- Added `--model-extends` option to the create:model command to allow the use to extend a custom default base class.
1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docs-test.crestapps.com
202 changes: 95 additions & 107 deletions README.md
Original file line number Diff line number Diff line change
@@ -5,64 +5,52 @@

An intelligent code generator for Laravel framework that will save you time! This awesome tool will help you generate resources like views, controllers, routes, migrations, languages and/or form-requests! It is extremely flexible and customizable to cover many on the use cases. It is shipped with cross-browsers compatible template, along with a client-side validation to modernize your application.

For full documentation and live demo please visit <a href="https://crestapps.com/laravel-code-generator/docs/2.3" target="_blank" title="Laravel Code Generator Documentation">CrestApps.com</a>

**Note: ** The available documentation is for versions <= 2.2. The documentation for vertion 2.3+ is very similar with some exceptions. Please review the <a href="https://github.com/CrestApps/laravel-code-generator/blob/master/CHANGELOG.md" title="ChangeLog">Change Log</a> to get a list of the changes.
For full documentation and live demo please visit <a href="https://laravel-code-generator.crestapps.com" target="_blank" title="Laravel Code Generator Documentation">CrestApps.com</a>

## Features

<ul>
<li>One step installation when using Laravel 5.5+</li>
<li>Create very clean, reusable and highly readable code to build on.</li>
<li>Create full resources using a single command with <strong>migration</strong> or from <strong>existing database</strong>.</li>
<li>Creates full resources for all of the existing tables in the database using one command.</li>
<li>Create full API-based resources using a single command with <strong>migration</strong> or from <strong>existing database</strong>.</li>
<li>Create beautiful documentation for your API.</li>
<li>Create api-resource and api-resource-collection with Laravel 5.5+.</li>
<li>Allows you to save the fields in a JSON file and recreate resources when the business needs changes.</li>
<li>Utilizes JSON based resource-file to allow you to define your resources. Resource-file allows you to easily regenerate the resource at any time even when the business rules change.</li>
<li>Create standard CRUD controllers with simple or form-request validation.</li>
<li>Customizable view’s templates to enable you to change the standard look and feel of your application.</li>
<li>Create model with relations.</li>
<li>Create named routes with and without group.</li>
<li>Create standard CRUD views.</li>
<li>Smart migration engine! Keeps track of all generated migrations to only create the needed migration.</li>
<li>Intelligent enough to automatically handles the relations between the models.</li>
<li>Very flexible and rich with configurable options.</li>
<li>Easy commands to create resource-file; additionally, add or reduce existing resource-file.</li>
<li>Full capability to generate multi-languages applications.</li>
<li>Client-side validation.</li>
<li>File uploading handling.</li>
<li>Auto store multiple-response in the database.</li>
<li>Create form-request to clean up your controller and increase your code reusability.</li>
<li>Create view's layouts with and without client-side validation.</li>
<li>Change the template at run time to generate different views.</li>
<li>Ability to generate views with and without Laravel-Collective.</li>
<li>Nicely handles any date, time or datetime field.</li>
<li>Auto handles any boolean field.</li>
<li>Very easy to use with lots of documentation.</li>
</ul>
- Craft clean, reusable, and highly readable code for seamless development.
- Generate complete resources effortlessly with a single command, supporting both migration and existing database scenarios.
- Streamline resource creation for all existing database tables with a single command.
- Save and recreate fields using a JSON file, ensuring adaptability to changing business needs.
- Leverage JSON-based resource files for easy regeneration, even when business rules evolve.
- Generate standard CRUD controllers with simple or form-request validation.
- Customize view templates to alter the standard look and feel of your application.
- Create models with relations for comprehensive data representation.
- Establish named routes with and without grouping for efficient navigation.
- Generate standard CRUD views to facilitate a consistent user experience.
- Smart migration engine tracks generated migrations to only create necessary ones.
- Intelligent handling of model relations to simplify development.
- Highly flexible with rich configurable options to suit diverse needs.
- Easy commands for resource-file creation, addition, or reduction.
- Full support for generating multi-language applications.
- Implement client-side validation for enhanced user interaction.
- Efficiently handle file uploading and store multiple responses in the database.
- Generate form-request to clean up controllers and boost code reusability.
- Create view layouts with and without client-side validation.
- Change templates at runtime for diverse view generation.
- Ability to generate views with or without Laravel-Collective integration.
- Seamless handling of date, time, or datetime fields.
- Automatic management of boolean fields for hassle-free development.

## Installation

1. To download this package into your laravel project, use the command-line to execute the following command
1. To download this package into your Laravel project, use the command-line to execute the following command

```
composer require crestapps/laravel-code-generator --dev
```

2. **(You may skip this step when using Laravel >= 5.5)** To bootstrap the packages into your project while using command-line only, open the app/Providers/AppServiceProvider.php file in your project. Then, add the following code to the register() method.

Add the following line to bootstrap laravel-code-generator to the framework.
Add the following line to bootstrap `laravel-code-generator` to the framework.

```
if ($this->app->runningInConsole()) {
$this->app->register('CrestApps\CodeGenerator\CodeGeneratorServiceProvider');
}
```

> A layout is required for the default views! The code generator allows you to create a layout using the command-line. Of cource you can use your own layout. You'll only need to include [CSS bootstrap framework](http://getbootstrap.com/ "CSS bootstrap framework") in your layout for the default templates to work properly. Additionally, you can chose to you design your own templetes using a different or no css framework.
## Lessons
Checkout our channel on <a href="https://www.youtube.com/channel/UCkEd0nOoRf3o0ahspAu7Y9w/videos" target="_blank" title="CrestApps YouTube Channel">YouTube.com</a>
* https://youtu.be/l21qNcsMAWg
@@ -74,77 +62,80 @@ Checkout our channel on <a href="https://www.youtube.com/channel/UCkEd0nOoRf3o0a
> The command in between the square brackets **[]** must be replaced with a variable of your choice.
<ul>
<li>
<strong>Main commands</strong>
<ul>
<li>php artisan create:scaffold [model-name]</li>
<li>php artisan create:controller [model-name]</li>
<li>php artisan create:model [model-name]</li>
<li>php artisan create:form-request [model-name]</li>
<li>php artisan create:routes [model-name]</li>
<li>php artisan create:migration [model-name]</li>
<li>php artisan create:language [model-name]</li>
<li>php artisan create:mapped-resources</li>
</ul>
</li>
<li>
<strong>API commands</strong>
<ul>
<li>php artisan create:api-scaffold [model-name]</li>
<li>php artisan create:api-controller [model-name]</li>
<li>php artisan create:api-resources [model-name]</li>
<li>php artisan api-doc:create-controller [model-name]</li>
<li>php artisan api-doc:create-view [model-name]</li>
</ul>
</li>
<li>
<strong>Views commands</strong>
<ul>
<li>php artisan create:layout [application-name]</li>
<li>php artisan create:views [model-name]</li>
<li>php artisan create:index-view [model-name]</li>
<li>php artisan create:create-view [model-name]</li>
<li>php artisan create:edit-view [model-name]</li>
<li>php artisan create:show-view [model-name]</li>
<li>php artisan create:form-view [model-name]</li>
</ul>
</li>
<li>
<strong>Resource's files commands</strong>
<ul>
<li>php artisan resource-file:from-database [model-name]</li>
<li>php artisan resource-file:create [model-name]</li>
<li>php artisan resource-file:append [model-name]</li>
<li>php artisan resource-file:reduce [model-name]</li>
<li>php artisan resource-file:delete [model-name]</li>
</ul>
</li>
<li>
<strong>Migration commands</strong>
<ul>
<li>php artisan migrate-all</li>
<li>php artisan migrate:rollback-all</li>
<li>php artisan migrate:reset-all</li>
<li>php artisan migrate:refresh-all</li>
<li>php artisan migrate:status-all</li>
</ul>
</li>
<li>
<strong>Main commands</strong>
<ul>
<li>php artisan create:scaffold [model-name]</li>
<li>php artisan create:controller [model-name]</li>
<li>php artisan create:model [model-name]</li>
<li>php artisan create:form-request [model-name]</li>
<li>php artisan create:routes [model-name]</li>
<li>php artisan create:migration [model-name]</li>
<li>php artisan create:language [model-name]</li>
<li>php artisan create:mapped-resources</li>
</ul>
</li>
<li>
<strong>API commands</strong>
<ul>
<li>php artisan create:api-scaffold [model-name]</li>
<li>php artisan create:api-controller [model-name]</li>
<li>php artisan create:api-resources [model-name]</li>
</ul>
</li>
<li>
<strong>API Documentations commands</strong>
<ul>
<li>php artisan api-docs:scaffold [model-name]</li>
<li>php artisan api-doc:create-controller [model-name]</li>
<li>php artisan api-doc:create-view [model-name]</li>
</ul>
</li>
<li>
<strong>Views commands</strong>
<ul>
<li>php artisan create:layout [application-name]</li>
<li>php artisan create:views [model-name]</li>
<li>php artisan create:index-view [model-name]</li>
<li>php artisan create:create-view [model-name]</li>
<li>php artisan create:edit-view [model-name]</li>
<li>php artisan create:show-view [model-name]</li>
<li>php artisan create:form-view [model-name]</li>
</ul>
</li>
<li>
<strong>Resource's files commands</strong>
<ul>
<li>php artisan resource-file:from-database [model-name]</li>
<li>php artisan resource-file:create [model-name]</li>
<li>php artisan resource-file:append [model-name]</li>
<li>php artisan resource-file:reduce [model-name]</li>
<li>php artisan resource-file:delete [model-name]</li>
</ul>
</li>
<li>
<strong>Migration commands</strong>
<ul>
<li>php artisan migrate-all</li>
<li>php artisan migrate:rollback-all</li>
<li>php artisan migrate:reset-all</li>
<li>php artisan migrate:refresh-all</li>
<li>php artisan migrate:status-all</li>
</ul>
</li>
</ul>

> Full documentation available at [CrestApps.com](https://www.crestapps.com/laravel-code-generator/docs/2.3 "Laravel Code Generator Documentation").

> Live demo is available at [CrestApps.com](https://www.crestapps.com/laravel-code-generator/demos/v2-3 "Laravel Code Generator Live Demo").
## Contribution

## Upgrading from version <= 2.2 to 2.3+
- Delete the `codegenerator.php` file found in your `config` folder, then rename the `codegenerator_custom.php` file to `laravel-code-generator.php` if one exists. Alternatively, you can delete both `codegenerator.php` and `codegenerator_custom.php`
Are you interested in supporting this project and making a contribution? Here's how you can get involved:

- Begin by showing your appreciation for this package on GitHub by giving it a **star**.
- Share this project with others to encourage ongoing enhancements and the introduction of new features.
- Report any bugs, provide comments, share ideas, or express your thoughts about this project by creating an issue on GitHub.
- Contributors are encouraged! If you're passionate about this project, consider addressing existing issues by submitting a pull request.
- If possible, consider [sponsoring the project](https://github.com/sponsors/CrestApps).

## Contribution
Do you like this project and want to contribute?
- **HELP WANTED** Version `v2.3` needs to be documented before it can be released. If you are able to contribute, please read the <a href="https://github.com/CrestApps/laravel-code-generator/blob/v2.3/CHANGELOG.md">change-log</a> in <a href="https://github.com/CrestApps/laravel-code-generator/tree/v2.3">v2.3 branch</a> and document it in the <a href="https://github.com/CrestApps/crestapps-site">CrestApps-site</a> repository. For any help, my email can be found in the `composer.json` file, feel free to send me an email.
- Please start by ***Staring*** this package on GitHub.
- Sharing this projects with others is your way of saying keep improvements and new awesome feature coming.
- Report any bugs or send us any comments, idea, thought that you may have about this project as an issue on GitHub.

## What did you create with this package?
I'd love to know if your site was generated using this package and list your logo on the documentation site. Please email using my contact info found in `composer.json` file.
@@ -241,12 +232,9 @@ The following example assumes that we are trying to create a CRUD called <var>As
<p><small>Then it will create a model <var>app/Models/AssetCategory</var>, a controller <var>app/Http/Controllers/AssetCategoriesController, all views and the routes!</var></small></p>
</blockquote>


## What's new?
* <a href="https://crestapps.com/laravel-code-generator/docs/2.3#release-notes">Release Notes</a>
s
* <a href="https://crestapps.com/laravel-code-generator/docs/2.3#upgrade-guide">Upgrade Guide</a>

## License

"Laravel Code Generator" is an open-sourced software licensed under the <a href="https://opensource.org/licenses/MIT" target="_blank" title="MIT license">MIT license</a>

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
"name": "crestapps/laravel-code-generator",
"license": "MIT",
"description": "An intelligent code generator for Laravel framework that will save you time! This awesome tool will help you generate resources like views, controllers, routes, migrations, languages and/or form-requests! It is extremely flexible and customizable to cover many on the use cases. It is shipped with cross-browsers compatible template, along with a client-side validation to modernize your application.",
"version": "v2.4.5",
"version": "v3.0.2",
"keywords": [
"laravel","crud","crud generator",
"laravel crud generator","laravel crud builder",
Loading