|
@@ -35,12 +35,12 @@ discard block |
|
|
block discarded – undo |
|
35
|
35
|
parent::__construct($app); |
|
36
|
36
|
|
|
37
|
37
|
if ($this->app['config']->get('repository') === null) { |
|
38
|
|
- $this->app['config']->set('repository', require __DIR__.'/config/repository.php'); |
|
|
38
|
+ $this->app['config']->set('repository', require __DIR__ . '/config/repository.php'); |
|
39
|
39
|
} |
|
40
|
|
- $interfaces= str_plural(Config::get('repository.interface')); |
|
41
|
|
- $repositories= str_plural(Config::get('repository.repository')); |
|
42
|
|
- $interface= Config::get('repository.interface'); |
|
43
|
|
- $repository= Config::get('repository.repository'); |
|
|
40
|
+ $interfaces = str_plural(Config::get('repository.interface')); |
|
|
41
|
+ $repositories = str_plural(Config::get('repository.repository')); |
|
|
42
|
+ $interface = Config::get('repository.interface'); |
|
|
43
|
+ $repository = Config::get('repository.repository'); |
|
44
|
44
|
|
|
45
|
45
|
$contractsFolder = realpath(__DIR__ . '/../../../../app/' . $interfaces); |
|
46
|
46
|
if ($contractsFolder) { |
|
@@ -53,7 +53,7 @@ discard block |
|
|
block discarded – undo |
|
53
|
53
|
$contractName = "App\\" . str_replace('/', '\\', $contract[0]); |
|
54
|
54
|
|
|
55
|
55
|
$repositoryClass = str_replace($interfaces, $repositories, $contractName); |
|
56
|
|
- $repositoryClass = str_replace([$interface,'Interface'], $repository, $repositoryClass); |
|
|
56
|
+ $repositoryClass = str_replace([$interface, 'Interface'], $repository, $repositoryClass); |
|
57
|
57
|
|
|
58
|
58
|
$this->providers[] = $contractName; |
|
59
|
59
|
$this->bindings[$contractName] = $repositoryClass; |