File tree Expand file tree Collapse file tree 3 files changed +64
-4
lines changed Expand file tree Collapse file tree 3 files changed +64
-4
lines changed Original file line number Diff line number Diff line change
1
+ # Changelog
2
+
3
+ ## 0.0.9 - 2019-03-27
4
+
5
+ - Add ` CHANGELOG.md ` , It's better to have this
6
+
7
+ ## 0.0.8 - 2019-03-27
8
+
9
+ - Add ` destroy ` method to base repository model and stub
10
+
11
+ ### FIXED
12
+
13
+ - Update ` repository.model.stub ` protected variable
14
+ - Rename base repository protected variable
15
+
16
+ ## 0.0.7 - 2019-03-27
17
+
18
+ - Add GitHub auto generated page
19
+ - Add ` CONTRIBUTING.md ` document
20
+
21
+ ### FIXED
22
+
23
+ - Fix base repository model, instance variable naming
24
+
25
+ ## 0.0.6 - 2019-03-26
26
+
27
+ - Improve ` README.md ` , make it consistance with generated repository
28
+ - ` repository.model.stub ` , Update model attribute name annotation
29
+
30
+ ## 0.0.5 - 2019-03-26
31
+
32
+ - ` repository.model.stub ` , Update model attribute name annotation
33
+
34
+ ## 0.0.4 - 2019-03-26
35
+
36
+ ### FIXED
37
+
38
+ - ` repository.model.stub ` , What is ` $ths ` ? Oops! change it to ` $this `
39
+
40
+ ## 0.0.3 - 2019-03-26
41
+
42
+ - Add use case diagram to ` README.md `
43
+ - Package require Laravel 5.3 -> 5.8 to be installed
44
+
45
+ ### FIXED
46
+
47
+ - ` repository.model.stub ` , constructor not inject ` DummyModelClass ` and ` $DummyModelVariable `
48
+
49
+ ## 0.0.2 - 2019-03-26
50
+
51
+ - Update package descriptions.
52
+ - Change package license from ** The Unlicense** to ** MIT** .
53
+
54
+ ## 0.0.1 - 2019-03-26
55
+
56
+ - A working concept of ** Repository Design Pattern**
57
+
58
+ ### Added
59
+
60
+ - Everything, initial release
Original file line number Diff line number Diff line change @@ -90,7 +90,7 @@ php artisan make:repository UserRepository --model=User
90
90
Update ` UserRepository ` logic:
91
91
92
92
``` php
93
- namespace App\Repositories;
93
+ namespace App\Http\ Repositories;
94
94
95
95
use App\User;
96
96
use PPSpaces\Repositories\Model as Repository;
@@ -116,7 +116,7 @@ class UserRepository extends Repository {
116
116
Within your ` UserController ` assume you have a resource controller created. Inject the ` UserRepository ` to the contoller.
117
117
118
118
``` php
119
- use App\Repositories\UserRepository;
119
+ use App\Http\ Repositories\UserRepository;
120
120
121
121
class UserController extends Controller
122
122
{
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ protected function getStub()
56
56
*/
57
57
protected function getDefaultNamespace ($ rootNamespace )
58
58
{
59
- return $ rootNamespace .'\Repositories ' ;
59
+ return $ rootNamespace .'\Http\ Repositories ' ;
60
60
}
61
61
62
62
/**
@@ -77,7 +77,7 @@ protected function buildClass($name)
77
77
$ replace = $ this ->buildModelReplacements ($ replace );
78
78
}
79
79
80
- $ replace ["use {$ controllerNamespace }\Controller; \n" ] = '' ;
80
+ // $replace["use {$controllerNamespace}\Controller;\n"] = '';
81
81
82
82
return str_replace (
83
83
array_keys ($ replace ), array_values ($ replace ), parent ::buildClass ($ name )
You can’t perform that action at this time.
0 commit comments