Skip to content

Commit d445c8c

Browse files
committed
readme modified
1 parent 1421bc4 commit d445c8c

File tree

1 file changed

+34
-10
lines changed

1 file changed

+34
-10
lines changed

README.md

Lines changed: 34 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,49 @@
11
# Repository and Service Command
22

33
## Instructions
4+
45
Download the repository and extract it.
56

67
## Installation
7-
###Step 1:
8+
9+
**Step 1:**
10+
811
Copy ```app/Console/Commands``` directory to your project ```app/Console/``` directory.
912
```$xslt
1013
|-- app/Console/Commands
1114
|-- Repository.php (core file)
1215
|-- Service.php (core file)
1316
```
1417

15-
###Step 2:
18+
**Step 2:**
19+
1620
Copy ```config/repository.php``` file to your project ```config/``` directory.
1721

1822
```$xslt
1923
|-- config
2024
|-- repository.php (core confid file)
2125
```
2226

23-
###Step 3:
27+
**Step 3:**
28+
2429
Add following commands to your ```app/Console/Kernel.php``` file.
2530
```$xslt
2631
protected $commands = [
2732
Commands\Repository::class,
2833
Commands\Service::class,
2934
];
3035
```
31-
###Step 4:
36+
**Step 4:**
37+
3238
Edit the config file. Remember All the directories are under `app` directory.
3339
```$xslt
3440
'repository_directory' => 'Repositories', ## app/Repositories
3541
'model_directory' => 'Models', #app/Models
3642
'service_directory' => 'Services', #app/Models
3743
```
38-
###Core File Structure:
44+
45+
> Core File Structure:
46+
3947
```
4048
|-- config/
4149
|-- repository.php
@@ -46,26 +54,35 @@ Edit the config file. Remember All the directories are under `app` directory.
4654
```
4755

4856
## Usage
49-
###Make Repository:
57+
58+
**Make Repository:**
59+
5060
The following command makes a repository class ```TestRepositoryName``` using model
5161
```TestModelName```.
62+
5263
```bash
5364
php artisan make:repository TestRepositoryName TestModelName
5465
```
55-
###Make Repository with Service:
66+
67+
**Make Repository with Service:**
68+
5669
The following command makes a repository class ```TestRepositoryName``` using model
5770
```TestModelName``` and a service ```TestServiceName```.
71+
5872
```bash
5973
php artisan make:repository TestRepositoryName TestModelName --service=TestServiceName
6074
```
75+
6176
or
77+
6278
```bash
6379
php artisan make:repository TestRepositoryName TestModelName --s=TestServiceName
6480
```
6581

6682
Service flag ```--service``` or ```--s``` is optional.
6783

68-
###Make Service:
84+
**Make Service:**
85+
6986
The following command makes a service class ```TestServiceName``` using repository
7087
```TestRepositoryName```.
7188

@@ -75,14 +92,21 @@ php artisan make:service TestServiceName TestRepositoryName
7592

7693

7794
## Contributing
95+
7896
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
7997

8098
Please make sure to update tests as appropriate.
99+
81100
##Inspired By:
82-
### [Mohammad Imran Hossain](https://github.com/imranctg16).
83101

84-
Very much grateful to @imranctg16.
102+
***
103+
[Mohammad Imran Hossain](https://github.com/imranctg16).
104+
***
105+
106+
Very much grateful to @imranctg16 .
107+
85108
## License
109+
86110
[MIT License](https://choosealicense.com/licenses/mit/)
87111

88112
Copyright (c) 2019 [Towfiqul Islam](https://github.com/laziestcoder/)

0 commit comments

Comments
 (0)