@@ -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; |
@@ -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 = [ |
@@ -215,6 +215,9 @@ discard block |
||
| 215 | 215 | return $model; |
| 216 | 216 | } |
| 217 | 217 | |
| 218 | + /** |
|
| 219 | + * @param string $model |
|
| 220 | + */ |
|
| 218 | 221 | protected function getViewColumns($model) |
| 219 | 222 | { |
| 220 | 223 | $columns = $this->getTableColumns($model); |
@@ -249,6 +252,9 @@ discard block |
||
| 249 | 252 | return $this->columnTypeMappings[$name] ?? 'text'; |
| 250 | 253 | } |
| 251 | 254 | |
| 255 | + /** |
|
| 256 | + * @param string $model |
|
| 257 | + */ |
|
| 252 | 258 | protected function getFormElements($model) |
| 253 | 259 | { |
| 254 | 260 | $columns = $this->getTableColumns($model); |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | * |
| 75 | 75 | * @param \Illuminate\Http\UploadedFile $file |
| 76 | 76 | * |
| 77 | - * @return \Closure|mixed|null|string |
|
| 77 | + * @return string |
|
| 78 | 78 | */ |
| 79 | 79 | public function getUploadPath(UploadedFile $file) |
| 80 | 80 | { |
@@ -107,7 +107,7 @@ discard block |
||
| 107 | 107 | * |
| 108 | 108 | * @param \Illuminate\Http\UploadedFile $file |
| 109 | 109 | * |
| 110 | - * @return mixed|string |
|
| 110 | + * @return string |
|
| 111 | 111 | */ |
| 112 | 112 | public function getUploadFileName(UploadedFile $file) |
| 113 | 113 | { |
@@ -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 | { |
@@ -2,10 +2,10 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace Sco\Admin\Http\Controllers; |
| 4 | 4 | |
| 5 | +use Illuminate\Foundation\Auth\AuthenticatesUsers; |
|
| 5 | 6 | use Illuminate\Foundation\Validation\ValidatesRequests; |
| 6 | 7 | use Illuminate\Http\Request; |
| 7 | 8 | use Illuminate\Routing\Controller; |
| 8 | -use Illuminate\Foundation\Auth\AuthenticatesUsers; |
|
| 9 | 9 | |
| 10 | 10 | class LoginController extends Controller |
| 11 | 11 | { |