@@ -91,7 +91,7 @@ |
||
91 | 91 | * |
92 | 92 | * @param string $path |
93 | 93 | * |
94 | - * @return mixed |
|
94 | + * @return string |
|
95 | 95 | */ |
96 | 96 | public function getHttpPathAttribute($path) |
97 | 97 | { |
@@ -2,10 +2,10 @@ |
||
2 | 2 | |
3 | 3 | namespace Encore\Admin\Auth\Database; |
4 | 4 | |
5 | -use Encore\Admin\Traits\DefaultDatetimeFormat; |
|
6 | -use Illuminate\Database\Eloquent\Model; |
|
7 | -use Illuminate\Database\Eloquent\Relations\BelongsToMany; |
|
8 | -use Illuminate\Http\Request; |
|
5 | +use Encore\Admin\Traits\DefaultDatetimeFormat; |
|
6 | +use Illuminate\Database\Eloquent\Model; |
|
7 | +use Illuminate\Database\Eloquent\Relations\BelongsToMany; |
|
8 | +use Illuminate\Http\Request; |
|
9 | 9 | use Illuminate\Support\Str; |
10 | 10 | |
11 | 11 | class Permission extends Model |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | { |
66 | 66 | $method = $this->http_method; |
67 | 67 | |
68 | - $matches = array_map(function ($path) use ($method) { |
|
68 | + $matches = array_map(function($path) use ($method) { |
|
69 | 69 | $path = trim(config('admin.route.prefix'), '/').$path; |
70 | 70 | |
71 | 71 | if (Str::contains($path, ':')) { |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | return false; |
118 | 118 | } |
119 | 119 | |
120 | - $method = collect($match['method'])->filter()->map(function ($method) { |
|
120 | + $method = collect($match['method'])->filter()->map(function($method) { |
|
121 | 121 | return strtoupper($method); |
122 | 122 | }); |
123 | 123 | |
@@ -157,7 +157,7 @@ discard block |
||
157 | 157 | { |
158 | 158 | parent::boot(); |
159 | 159 | |
160 | - static::deleting(function ($model) { |
|
160 | + static::deleting(function($model) { |
|
161 | 161 | $model->roles()->detach(); |
162 | 162 | }); |
163 | 163 | } |