|
@@ -21,13 +21,13 @@ |
|
|
block discarded – undo |
|
21
|
21
|
$modelName = $routeModel->keys()->first(); |
|
22
|
22
|
|
|
23
|
23
|
$binding = collect(app()->getBindings()) |
|
24
|
|
- ->filter(function ($binding, $key) use ($modelName) { |
|
25
|
|
- return Str::contains($key, '\\'.ucfirst($modelName)) && Str::endsWith($key, 'Service'); |
|
|
24
|
+ ->filter(function($binding, $key) use ($modelName) { |
|
|
25
|
+ return Str::contains($key, '\\' . ucfirst($modelName)) && Str::endsWith($key, 'Service'); |
|
26
|
26
|
}) |
|
27
|
27
|
->keys() |
|
28
|
28
|
->first(); |
|
29
|
29
|
|
|
30
|
|
- $modelMethod = 'get'.ucwords($modelName); |
|
|
30
|
+ $modelMethod = 'get' . ucwords($modelName); |
|
31
|
31
|
|
|
32
|
32
|
return $this->user()->can('view', app($binding)->$modelMethod()); |
|
33
|
33
|
} |
Please login to merge, or discard this patch.