@@ -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 | { |
@@ -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 | { |
@@ -20,6 +20,9 @@ |
||
20 | 20 | return $this->size; |
21 | 21 | } |
22 | 22 | |
23 | + /** |
|
24 | + * @param string $value |
|
25 | + */ |
|
23 | 26 | public function setSize($value) |
24 | 27 | { |
25 | 28 | $this->size = $value; |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | /** |
91 | 91 | * Get the observable ability names. |
92 | 92 | * |
93 | - * @return array |
|
93 | + * @return string[] |
|
94 | 94 | */ |
95 | 95 | public function getObservableAbilities() |
96 | 96 | { |
@@ -103,6 +103,10 @@ discard block |
||
103 | 103 | ); |
104 | 104 | } |
105 | 105 | |
106 | + /** |
|
107 | + * @param string $ability |
|
108 | + * @param string $callback |
|
109 | + */ |
|
106 | 110 | public function registerAbility($ability, $callback) |
107 | 111 | { |
108 | 112 | $this->abilities->put($ability, $this->makeAbilityCallback($callback)); |
@@ -124,7 +128,7 @@ discard block |
||
124 | 128 | /** |
125 | 129 | * @param string $ability |
126 | 130 | * |
127 | - * @return mixed |
|
131 | + * @return boolean |
|
128 | 132 | */ |
129 | 133 | final public function can($ability) |
130 | 134 | { |
@@ -38,7 +38,7 @@ |
||
38 | 38 | protected $priority = 100; |
39 | 39 | |
40 | 40 | /** |
41 | - * @return mixed |
|
41 | + * @return string |
|
42 | 42 | */ |
43 | 43 | public function getPageId() |
44 | 44 | { |
@@ -8,7 +8,6 @@ |
||
8 | 8 | use Illuminate\Foundation\Application; |
9 | 9 | use InvalidArgumentException; |
10 | 10 | use Sco\Admin\Contracts\RepositoryInterface; |
11 | -use Sco\Admin\Contracts\WithModel; |
|
12 | 11 | |
13 | 12 | class Repository implements RepositoryInterface |
14 | 13 | { |
@@ -41,6 +41,9 @@ |
||
41 | 41 | $this->extensions->initialize(); |
42 | 42 | } |
43 | 43 | |
44 | + /** |
|
45 | + * @param string $name |
|
46 | + */ |
|
44 | 47 | public function extend($name, ExtensionInterface $extension) |
45 | 48 | { |
46 | 49 | $this->extensions->put($name, $extension); |
@@ -7,11 +7,11 @@ |
||
7 | 7 | use Illuminate\Database\Eloquent\Model; |
8 | 8 | use Sco\Admin\Contracts\RepositoryInterface; |
9 | 9 | use Sco\Admin\Contracts\View\Extensions\ExtensionInterface; |
10 | +use Sco\Admin\Contracts\View\Filters\FilterInterface; |
|
10 | 11 | use Sco\Admin\Contracts\View\ViewInterface; |
11 | 12 | use Sco\Admin\View\Extensions\Applies; |
12 | 13 | use Sco\Admin\View\Extensions\Filters; |
13 | 14 | use Sco\Admin\View\Extensions\Scopes; |
14 | -use Sco\Admin\Contracts\View\Filters\FilterInterface; |
|
15 | 15 | |
16 | 16 | /** |
17 | 17 | * @method Scopes getScopes() get query scopes |
@@ -221,6 +221,10 @@ |
||
221 | 221 | return $this->getValueFromObject($this->getModel(), $this->getName()); |
222 | 222 | } |
223 | 223 | |
224 | + /** |
|
225 | + * @param Model $instance |
|
226 | + * @param string $name |
|
227 | + */ |
|
224 | 228 | protected function getValueFromObject($instance, $name) |
225 | 229 | { |
226 | 230 | $parts = explode('.', $name); |
@@ -267,6 +267,9 @@ |
||
267 | 267 | ]; |
268 | 268 | } |
269 | 269 | |
270 | + /** |
|
271 | + * @param string $rule |
|
272 | + */ |
|
270 | 273 | public function addValidationRule($rule, $message = null) |
271 | 274 | { |
272 | 275 | $uploadRules = [ |