@@ -3,10 +3,10 @@ |
||
3 | 3 | namespace Sco\Admin\Http\Controllers\Auth; |
4 | 4 | |
5 | 5 | use Auth; |
6 | +use Illuminate\Foundation\Auth\AuthenticatesUsers; |
|
6 | 7 | use Illuminate\Foundation\Validation\ValidatesRequests; |
7 | 8 | use Illuminate\Http\Request; |
8 | 9 | use Illuminate\Routing\Controller; |
9 | -use Illuminate\Foundation\Auth\AuthenticatesUsers; |
|
10 | 10 | |
11 | 11 | class LoginController extends Controller |
12 | 12 | { |
@@ -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 | { |
@@ -3,9 +3,6 @@ |
||
3 | 3 | namespace Sco\Admin\Console; |
4 | 4 | |
5 | 5 | use Illuminate\Console\Command; |
6 | -use Symfony\Component\Process\Exception\ProcessFailedException; |
|
7 | -use Symfony\Component\Process\ExecutableFinder; |
|
8 | -use Symfony\Component\Process\Process; |
|
9 | 6 | |
10 | 7 | class InstallCommand extends Command |
11 | 8 | { |
@@ -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 | { |
@@ -5,7 +5,6 @@ |
||
5 | 5 | use Illuminate\Http\Request; |
6 | 6 | use Illuminate\Routing\Controller; |
7 | 7 | use Sco\Admin\Http\Requests\StorePermissionRequest; |
8 | -use Sco\Admin\Http\Requests\PermissionRequest; |
|
9 | 8 | use Sco\Admin\Http\Requests\UpdatePermissionRequest; |
10 | 9 | use Sco\Admin\Models\Permission; |
11 | 10 |
@@ -4,8 +4,8 @@ |
||
4 | 4 | |
5 | 5 | use Closure; |
6 | 6 | use Illuminate\Auth\Access\AuthorizationException; |
7 | -use Route; |
|
8 | 7 | use Illuminate\Contracts\Auth\Factory as Auth; |
8 | +use Route; |
|
9 | 9 | |
10 | 10 | class RouteAuthorize |
11 | 11 | { |
@@ -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'); |
@@ -141,6 +141,9 @@ discard block |
||
141 | 141 | } |
142 | 142 | } |
143 | 143 | |
144 | + /** |
|
145 | + * @param \Illuminate\Http\Request $request |
|
146 | + */ |
|
144 | 147 | protected function isAdmin($request) |
145 | 148 | { |
146 | 149 | $route = $request->route(); |
@@ -151,7 +154,7 @@ discard block |
||
151 | 154 | * @param \Illuminate\Http\Request $request |
152 | 155 | * @param \Sco\Admin\Contracts\ExceptionInterface $exception |
153 | 156 | * |
154 | - * @return \Illuminate\Contracts\Routing\ResponseFactory|\Symfony\Component\HttpFoundation\Response |
|
157 | + * @return \Symfony\Component\HttpFoundation\Response|null |
|
155 | 158 | */ |
156 | 159 | protected function renderAdminException( |
157 | 160 | $request, |
@@ -115,6 +115,9 @@ |
||
115 | 115 | return $this->getValueFromObject($this->getModel(), $this->getName()); |
116 | 116 | } |
117 | 117 | |
118 | + /** |
|
119 | + * @param Model $instance |
|
120 | + */ |
|
118 | 121 | protected function getValueFromObject($instance, $name) |
119 | 122 | { |
120 | 123 | $parts = explode('.', $name); |
@@ -52,6 +52,9 @@ discard block |
||
52 | 52 | return $this->getRepository()->isRestorable(); |
53 | 53 | } |
54 | 54 | |
55 | + /** |
|
56 | + * @param string $class |
|
57 | + */ |
|
55 | 58 | public function registerObserver($class = null) |
56 | 59 | { |
57 | 60 | if (!$class) { |
@@ -72,6 +75,9 @@ discard block |
||
72 | 75 | $this->permissions[$permission] = $callback; |
73 | 76 | } |
74 | 77 | |
78 | + /** |
|
79 | + * @param string $permission |
|
80 | + */ |
|
75 | 81 | public function can($permission) |
76 | 82 | { |
77 | 83 | if (is_callable($this->permissions[$permission])) { |
@@ -3,7 +3,6 @@ |
||
3 | 3 | namespace Sco\Admin\Component; |
4 | 4 | |
5 | 5 | use Illuminate\Foundation\Application; |
6 | -use Illuminate\Http\Request; |
|
7 | 6 | use Sco\Admin\Component\Concerns\HasEvents; |
8 | 7 | use Sco\Admin\Component\Concerns\HasNavigation; |
9 | 8 | use Sco\Admin\Contracts\ComponentInterface; |
@@ -75,7 +75,7 @@ |
||
75 | 75 | } |
76 | 76 | |
77 | 77 | /** |
78 | - * @param Model|string $options |
|
78 | + * @param string $options |
|
79 | 79 | * |
80 | 80 | * @return array |
81 | 81 | */ |