4
4
Download the repository and extract it.
5
5
6
6
## Installation
7
- #### Step 1:
7
+ ###Step 1:
8
8
Copy ``` app/Console/Commands ``` directory to your project ``` app/Console/ ``` directory.
9
9
``` $xslt
10
10
|-- app/Console/Commands
11
11
|-- Repository.php (core file)
12
12
|-- Service.php (core file)
13
13
```
14
14
15
- #### Step 2:
15
+ ###Step 2:
16
16
Copy ``` config/repository.php ``` file to your project ``` config/ ``` directory.
17
17
18
18
``` $xslt
19
19
|-- config
20
20
|-- repository.php (core confid file)
21
21
```
22
22
23
- #### Step 3:
23
+ ###Step 3:
24
24
Add following commands to your ``` app/Console/Kernel.php ``` file.
25
25
``` $xslt
26
26
protected $commands = [
27
27
Commands\Repository::class,
28
28
Commands\Service::class,
29
29
];
30
30
```
31
- #### Step 4:
31
+ ###Step 4:
32
32
Edit the config file. Remember All the directories are under ` app ` directory.
33
33
``` $xslt
34
34
'repository_directory' => 'Repositories', ## app/Repositories
@@ -46,13 +46,13 @@ Edit the config file. Remember All the directories are under `app` directory.
46
46
```
47
47
48
48
## Usage
49
- #### Make Repository:
49
+ ###Make Repository:
50
50
The following command makes a repository class ``` TestRepositoryName ``` using model
51
51
``` TestModelName ``` .
52
52
``` bash
53
53
php artisan make:repository TestRepositoryName TestModelName
54
54
```
55
- #### Make Repository with Service:
55
+ ###Make Repository with Service:
56
56
The following command makes a repository class ``` TestRepositoryName ``` using model
57
57
``` TestModelName ``` and a service ``` TestServiceName ``` .
58
58
``` bash
@@ -65,7 +65,7 @@ php artisan make:repository TestRepositoryName TestModelName --s=TestServiceName
65
65
66
66
Service flag ``` --service ``` or ``` --s ``` is optional.
67
67
68
- #### Make Service:
68
+ ###Make Service:
69
69
The following command makes a service class ``` TestServiceName ``` using repository
70
70
``` TestRepositoryName ``` .
71
71
@@ -79,7 +79,7 @@ Pull requests are welcome. For major changes, please open an issue first to disc
79
79
80
80
Please make sure to update tests as appropriate.
81
81
##Inspired By:
82
- ##### [ Mohammad Imran Hossain] ( https://github.com/imranctg16 ) .
82
+ ### [ Mohammad Imran Hossain] ( https://github.com/imranctg16 ) .
83
83
84
84
Very much grateful to @imranctg16 .
85
85
## License
0 commit comments