@@ -17,8 +17,6 @@ |
||
| 17 | 17 | |
| 18 | 18 | namespace App\Http\Controllers; |
| 19 | 19 | |
| 20 | -use App\Http\Requests; |
|
| 21 | -use App\Models\DbConfig; |
|
| 22 | 20 | use Illuminate\Http\Request; |
| 23 | 21 | use Settings; |
| 24 | 22 | |
@@ -32,11 +32,17 @@ discard block |
||
| 32 | 32 | { |
| 33 | 33 | // 'config_name', 'config_value' |
| 34 | 34 | |
| 35 | + /** |
|
| 36 | + * @param string $key |
|
| 37 | + */ |
|
| 35 | 38 | public function has($key) |
| 36 | 39 | { |
| 37 | 40 | return DbConfig::exactKey($key)->exists(); |
| 38 | 41 | } |
| 39 | 42 | |
| 43 | + /** |
|
| 44 | + * @param string $key |
|
| 45 | + */ |
|
| 40 | 46 | public function get($key, $default = null) |
| 41 | 47 | { |
| 42 | 48 | $results = DbConfig::key($key)->get(['config_name', 'config_value']); |
@@ -100,6 +106,9 @@ discard block |
||
| 100 | 106 | return $ret; |
| 101 | 107 | } |
| 102 | 108 | |
| 109 | + /** |
|
| 110 | + * @param \Illuminate\Database\Eloquent\Collection $objs |
|
| 111 | + */ |
|
| 103 | 112 | private function objsToArray($objs) |
| 104 | 113 | { |
| 105 | 114 | $ret = array(); |
@@ -26,7 +26,6 @@ |
||
| 26 | 26 | |
| 27 | 27 | |
| 28 | 28 | use App\Models\DbConfig; |
| 29 | -use App\Models\Notification; |
|
| 30 | 29 | |
| 31 | 30 | class DatabaseRepository |
| 32 | 31 | { |