@@ -30,22 +30,25 @@ Note: Make sure to run `composer dump-autoload` after these changes.
30
30
## Usage
31
31
List of artisan commands:
32
32
33
- | Command | Inputs | Options | Description |
34
- | ----------------------------------------| -------------| ----------------| -----------------------------------|
35
- | ` repository:make-entity ` | table_name | -f, -d, -k, -g | Create new Entity |
36
- | ` repository:make-factory ` | table_name | -f, -d, -g | Create new Factory |
37
- | ` repository:make-resource ` | table_name | -f, -d, -k, -g | Create new Resource |
38
- | ` repository:make-interface-repository ` | table_name | -f, -d, -k, -g | Create new Repository Interface |
39
- | ` repository:make-repository ` | table_name | -f, -d, -k, -g | Create new Base Repository |
40
- | ` repository:make-mysql-repository ` | table_name | -f, -d, -k, -g | Create new MySql Repository class |
41
- | ` repository:make-redis-repository ` | table_name | -f, -d, -k, -g | Create new Redis Repository class |
42
- | ` repository:make-all ` | table_names | -f, -d, -k, -g | Run all of the above commands |
33
+ | Command | Inputs | Options | Description |
34
+ | ----------------------------------------| -------------------------------------| --------------------| -----------------------------------|
35
+ | ` repository:make-entity ` | table_name | -f, -d, -k, -g | Create new Entity |
36
+ | ` repository:make-enum ` | table_name | -f, -d, -g | Create new Enum |
37
+ | ` repository:make-factory ` | table_name | -f, -d, -g | Create new Factory |
38
+ | ` repository:make-resource ` | table_name | -f, -d, -k, -g | Create new Resource |
39
+ | ` repository:make-interface-repository ` | table_name | -f, -d, -k, -g | Create new Repository Interface |
40
+ | ` repository:make-repository ` | table_name | -f, -d, -k, -g | Create new Base Repository |
41
+ | ` repository:make-mysql-repository ` | table_name | -f, -d, -k, -g | Create new MySql Repository class |
42
+ | ` repository:make-redis-repository ` | table_name | -f, -d, -k, -g | Create new Redis Repository class |
43
+ | ` repository:make-all ` | --table_names=table_names(optional) | -a, -f, -d, -k, -g | Run all of the above commands |
43
44
44
45
### Options Explanation
45
46
- ` -f|--force ` : Force commands to override existing files.
46
47
- ` -d|--delete ` : Delete already created files.
47
48
- ` -k|--foreign-keys ` : Try to detect foreign keys of table.
48
49
- ` -g|--add-to-git ` : Add created files to git repository.
50
+ - ` -a|--all-tables ` : Use all existing tables.
51
+ - ` --table_names= ` : Add table names, separate names with comma.
49
52
50
53
Example 1. Create new Entity for a table named 'users'.
51
54
``` bash
@@ -54,5 +57,10 @@ php artisan repository:make-entity users
54
57
55
58
Example 2. Create all necessary classes for two tables named 'users' and 'customers' with enabled foreign key option.
56
59
``` bash
57
- php artisan repository:make-all users customers -k
60
+ php artisan repository:make-all --table_names=users,customers -k
61
+ ```
62
+
63
+ Example 3. Create all necessary classes for all tables with enabled foreign key option(this may be used for new projects).
64
+ ``` bash
65
+ php artisan repository:make-all -a -k
58
66
```
0 commit comments