You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+59-19Lines changed: 59 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
# An awesome code generator for laravel framework - with client-side validation
2
2
3
-
For full documentation and live demo please visit <ahref="https://crestapps.com/laravel-code-generator/docs/2.0"target="_blank"title="Laravel Code Generator Documentation">CrestApps.com</a>
3
+
For full documentation and live demo please visit <ahref="https://crestapps.com/laravel-code-generator/docs/2.1"target="_blank"title="Laravel Code Generator Documentation">CrestApps.com</a>
4
4
5
5
## Introduction
6
6
@@ -31,10 +31,6 @@ A clean code generator for Laravel framework that will save you time! This aweso
To bootstrap the packages into your project, open the `config/app.php` file in your project. Then, look for the providers array.
42
+
**(Skip this step when using Laravl >= 5.5)** To bootstrap the packages into your project, open the `config/app.php` file in your project. Then, look for the providers array.
47
43
48
44
Add the following line to bootstrap laravel-code-generator to the framework.
> 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.
60
56
61
-
62
57
## Available Commands
63
58
64
59
> The command in between the square brackets [] must be replaced with a variable of your choice.
65
60
66
-
* php artisan create:resources[model-name]
67
61
* php artisan create:layout[application-name]
68
-
* php artisan create:controller[controller-name]
62
+
* php artisan create:resources[model-name]
63
+
* php artisan create:mapped-resources
64
+
* php artisan create:controller[model-name]
69
65
* php artisan create:model[model-name]
70
-
* php artisan create:routes[controller-name]
66
+
* php artisan create:routes[model-name]
71
67
* php artisan create:views[model-name]
72
68
* php artisan create:create-view[model-name]
73
69
* php artisan create:edit-view[model-name]
74
70
* php artisan create:index-view[model-name]
75
71
* php artisan create:show-view[model-name]
76
72
* php artisan create:form-view[model-name]
77
-
* php artisan create:migration[table-name]
78
-
* php artisan create:form-request[class-name]
79
-
* php artisan create:language[language-file-name]
80
-
* php artisan create:fields-file[table-name]
81
-
* php artisan fields-file:create[file-name]
82
-
* php artisan fields-file:append[file-name]
83
-
* php artisan fields-file:reduce[file-name]
73
+
* php artisan create:migration[model-name]
74
+
* php artisan create:form-request[model-name]
75
+
* php artisan create:language[model-name]
76
+
* php artisan create:fields-file[model-name]
77
+
* php artisan fields-file:create[model-name]
78
+
* php artisan fields-file:append[model-name]
79
+
* php artisan fields-file:reduce[model-name]
80
+
* php artisan fields-file:delete[model-name]
81
+
82
+
> Full documentation available at [CrestApps.com](https://www.crestapps.com/laravel-code-generator/docs/2.1"Laravel Code Generator Documentation").
83
+
84
+
> Live demo is available at [CrestApps.com](https://www.crestapps.com/laravel-code-generator/demos/v2-1"Laravel Code Generator Live Demo").
85
+
86
+
87
+
## Examples
88
+
89
+
Lets create a CRUD called <var>AssetCategory</var> with the fields listed below.
84
90
85
-
> Full documentation available at [CrestApps.com](https://www.crestapps.com/laravel-code-generator/docs/2.0"Laravel Code Generator Documentation").
91
+
- id
92
+
- name
93
+
- description
94
+
- is_active
86
95
87
-
> Live demo is available at [CrestApps.com](https://www.crestapps.com/laravel-code-generator/demos/2.0"Laravel Code Generator Live Demo").
<p><small>The above command will create a model <var>app/Models/AssetCategory</var>, a controller <var>app/Http/Controllers/AsseyCategoriesController, all views, the routes, and migration file!</var></small></p>
104
+
</blockquote>
105
+
106
+
107
+
### Basic example using translations for english and arabic
<p><small>The above command will create a model <var>app/Models/AssetCategory</var>, a controller <var>app/Http/Controllers/AsseyCategoriesController, all views, the routes, and migration file!</var></small></p>
114
+
</blockquote>
115
+
116
+
117
+
### Creating resources from existing database with translation for english and arabic
<p><small>The above command will create fields-file names <var>/resources/codegenerator-files/asset_categories.json</var></small></p>
122
+
<p><small>Then it will create a model <var>app/Models/AssetCategory</var>, a controller <var>app/Http/Controllers/AsseyCategoriesController, all views and the routes!</var></small></p>
123
+
<p><small>You may also create a fields-file from existing database separately using <code>create:fields-file AssetCategory --translation-for=en,ar</code></small></p>
0 commit comments