@@ -100,7 +100,7 @@ |
||
100 | 100 | * |
101 | 101 | * @param Request $request |
102 | 102 | * |
103 | - * @return \Illuminate\Http\Response |
|
103 | + * @return \Illuminate\Http\RedirectResponse |
|
104 | 104 | */ |
105 | 105 | public function logout(Request $request) |
106 | 106 | { |
@@ -34,7 +34,7 @@ |
||
34 | 34 | /** |
35 | 35 | * 菜单列表 |
36 | 36 | * |
37 | - * @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View |
|
37 | + * @return \Illuminate\Http\JsonResponse |
|
38 | 38 | */ |
39 | 39 | public function getList() |
40 | 40 | { |
@@ -136,6 +136,9 @@ discard block |
||
136 | 136 | } |
137 | 137 | } |
138 | 138 | |
139 | + /** |
|
140 | + * @param \Illuminate\Http\Request $request |
|
141 | + */ |
|
139 | 142 | protected function isAdmin($request) |
140 | 143 | { |
141 | 144 | $route = $request->route(); |
@@ -146,7 +149,7 @@ discard block |
||
146 | 149 | * @param \Illuminate\Http\Request $request |
147 | 150 | * @param \Sco\Admin\Exceptions\AdminException $exception |
148 | 151 | * |
149 | - * @return \Illuminate\Contracts\Routing\ResponseFactory|\Symfony\Component\HttpFoundation\Response |
|
152 | + * @return \Symfony\Component\HttpFoundation\Response|null |
|
150 | 153 | */ |
151 | 154 | protected function renderAdminException($request, AdminException $exception) |
152 | 155 | { |
@@ -27,6 +27,10 @@ |
||
27 | 27 | //$this->storePermission('admin.system.menu', '菜单'); |
28 | 28 | } |
29 | 29 | |
30 | + /** |
|
31 | + * @param string $name |
|
32 | + * @param string $displayName |
|
33 | + */ |
|
30 | 34 | private function storePermission($name, $displayName, $description = '') |
31 | 35 | { |
32 | 36 | $permissionModelName = config('entrust.permission'); |
@@ -40,6 +40,9 @@ |
||
40 | 40 | return $this->configManagers->get($name); |
41 | 41 | } |
42 | 42 | |
43 | + /** |
|
44 | + * @param string $name |
|
45 | + */ |
|
43 | 46 | private function getConfigFile($name) |
44 | 47 | { |
45 | 48 | return $this->app['path.config'] |
@@ -24,6 +24,9 @@ |
||
24 | 24 | protected $model; |
25 | 25 | protected $elements; |
26 | 26 | |
27 | + /** |
|
28 | + * @param string $name |
|
29 | + */ |
|
27 | 30 | public function __construct($name, Application $app, Repository $repository) |
28 | 31 | { |
29 | 32 | $this->name = $name; |
@@ -67,6 +67,9 @@ |
||
67 | 67 | $this->permissions[$permission] = $callback; |
68 | 68 | } |
69 | 69 | |
70 | + /** |
|
71 | + * @param string $permission |
|
72 | + */ |
|
70 | 73 | public function can($permission) |
71 | 74 | { |
72 | 75 | if (is_callable($this->permissions[$permission])) { |