Skip to content

Commit 87e79b6

Browse files
committed
Update the readme.md file with the new commands
1 parent 2dc0577 commit 87e79b6

File tree

1 file changed

+26
-24
lines changed

1 file changed

+26
-24
lines changed

README.md

Lines changed: 26 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
## Introduction
23

34
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.
@@ -61,7 +62,7 @@ For full documentation and live demo please visit <a href="https://crestapps.com
6162
> 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.
6263
6364
## Lessons
64-
Checkout our YouTube channel on <a href="https://www.youtube.com/channel/UCkEd0nOoRf3o0ahspAu7Y9w/videos" target="_blank" title="CrestApps YouTube Channel">YouTube.com</a>
65+
Checkout our channel on <a href="https://www.youtube.com/channel/UCkEd0nOoRf3o0ahspAu7Y9w/videos" target="_blank" title="CrestApps YouTube Channel">YouTube.com</a>
6566
* https://youtu.be/l21qNcsMAWg
6667
* https://youtu.be/infoecfXOCw
6768

@@ -133,59 +134,60 @@ The following example assumes that we are trying to create a CRUD called <var>As
133134
- is_active
134135

135136

136-
#### Basic example
137+
#### Basic example - CRUD with migration
137138

138139
<blockquote>
139-
<p><code>php artisan resource-file:create AssetCategory --names=id,name,description,is_active</code></p>
140-
<p><small>The above command will create resource-file names <var>/resources/codegenerator-files/asset_categories.json</var></small></p>
141-
<p><code>php artisan create:resources AssetCategory</code></p>
142-
<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>
140+
<p><code>php artisan resource-file:create AssetCategory --fields=id,name,description,is_active</code></p>
141+
<p><small>The above command will create resource-file names <var>/resources/laravel-code-generator/sources/asset_categories.json</var></small></p>
142+
<p><code>php artisan create:resources AssetCategory --with-migration</code></p>
143+
<p><small>The above command will create a model <var>app/Models/AssetCategory</var>, a controller <var>app/Http/Controllers/AssetCategoriesController, all views, the routes, and migration class!</var></small></p>
143144
</blockquote>
144145

145146

146-
### Basic example using translations for English and Arabic
147+
### Basic example using translations for English and Arabic - with migration
147148

148149
<blockquote>
149-
<p><code>php artisan fields-file:create AssetCategory --names=id,name,description,is_active --translation-for=en,ar</code></p>
150-
<p><small>The above command will create resource-file names <var>/resources/codegenerator-files/asset_categories.json</var></small></p>
151-
<p><code>php artisan create:resources AssetCategory</code></p>
152-
<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>
150+
<p><code>php artisan resource-file:create AssetCategory --fields=id,name,description,is_active --translation-for=en,ar</code></p>
151+
<p><small>The above command will create resource-file names <var>/resources/laravel-code-generator/sources/asset_categories.json</var></small></p>
152+
<p><code>php artisan create:resources AssetCategory --with-migration</code></p>
153+
<p><small>The above command will create a model <var>app/Models/AssetCategory</var>, a controller <var>app/Http/Controllers/AssetCategoriesController, all views, the routes, and migration class!</var></small></p>
153154
</blockquote>
154155

155156
### Basic example with form-request
156157

157158
<blockquote>
158-
<p><code>php artisan resource-file:create AssetCategory --names=id,name,description,is_active</code></p>
159-
<p><small>The above command will create resource-file names <var>/resources/codegenerator-files/asset_categories.json</var></small></p>
159+
<p><code>php artisan resource-file:create AssetCategory --fields=id,name,description,is_active</code></p>
160+
<p><small>The above command will create resource-file names <var>/resources/laravel-code-generator/sources/asset_categories.json</var></small></p>
160161
<p><code>php artisan create:resources AssetCategory --with-form-request</code></p>
161-
<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>
162+
<p><small>The above command will create a model <var>app/Models/AssetCategory</var>, a controller <var>app/Http/Controllers/AssetCategoriesController, all views, the routes, and <var>app/Http/Requests/AssetCategoriesFormRequest</var> class!</var></small></p>
162163
</blockquote>
163164

164165
### Basic example with soft-delete and migration
165166

166167
<blockquote>
167-
<p><code>php artisan resource-file:create AssetCategory --names=id,name,description,is_active</code></p>
168-
<p><small>The above command will create resource-file names <var>/resources/codegenerator-files/asset_categories.json</var></small></p>
168+
<p><code>php artisan resource-file:create AssetCategory --fields=id,name,description,is_active</code></p>
169+
<p><small>The above command will create resource-file names <var>/resources/laravel-code-generator/sources/asset_categories.json</var></small></p>
169170
<p><code>php artisan create:resources AssetCategory --with-soft-delete --with-migration</code></p>
170-
<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>
171+
<p><small>The above command will create a model <var>app/Models/AssetCategory</var>, a controller <var>app/Http/Controllers/AssetCategoriesController, all views, the routes, and migration file!</var></small></p>
171172
</blockquote>
172173

173174
### Creating resources from existing database
174175

175176
<blockquote>
176177
<p><code>php artisan create:resources AssetCategory --table-exists</code></p>
177-
<p><small>The above command will create resource-file names <var>/resources/codegenerator-files/asset_categories.json</var></small></p>
178-
<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>
178+
<p><small>The above command will create resource-file names <var>/resources/laravel-code-generator/sources/asset_categories.json</var>. It is going to assume that the table name is called "asset_categories" in your database. If that is not the case, you can use <var>--table-name=some_other_table_name</var></small></p>
179+
180+
<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>
179181
<p><small>You may also create a resource-file from existing database separately using <code>php artisan resource-file:form-database AssetCategory</code></small></p>
180182
</blockquote>
181183

182184

183185
### Creating resources from existing database with translation for English and Arabic
184186

185187
<blockquote>
186-
<p><code>php artisan create:resources AssetCategory --table-exists --translation-for=en,ar</code></p>
187-
<p><small>The above command will create resource-file names <var>/resources/codegenerator-files/asset_categories.json</var></small></p>
188-
<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>
188+
<p><code>php artisan create:resources AssetCategory --translation-for=en,ar --table-exists</code></p>
189+
<p><small>The above command will create resource-file names <var>/resources/laravel-code-generator/sources/asset_categories.json</var></small></p>
190+
<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>
189191
<p><small>You may also create a resource-file from existing database separately using <code>php artisan resource-file:form-database AssetCategory --translation-for=en,ar</code></small></p>
190192
</blockquote>
191193

@@ -194,8 +196,8 @@ The following example assumes that we are trying to create a CRUD called <var>As
194196
<blockquote>
195197
<p><code>php artisan resource-file:form-database AssetCategory --translation-for=en,ar</code></p>
196198
<p><code>php artisan create:resources AssetCategory</code></p>
197-
<p><small>The above command will create resource-file names <var>/resources/codegenerator-files/asset_categories.json</var></small></p>
198-
<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>
199+
<p><small>The above command will create resource-file names <var>/resources/laravel-code-generator/sources/asset_categories.json</var></small></p>
200+
<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>
199201
</blockquote>
200202

201203

0 commit comments

Comments
 (0)