@@ -18,7 +18,7 @@ |
||
18 | 18 | public function register() |
19 | 19 | { |
20 | 20 | $this->app->register(\Laravel\Telescope\TelescopeServiceProvider::class); |
21 | - //Telescope::night(); |
|
21 | + //Telescope::night(); |
|
22 | 22 | |
23 | 23 | Telescope::filter(function (IncomingEntry $entry) { |
24 | 24 |
@@ -20,11 +20,11 @@ discard block |
||
20 | 20 | $this->app->register(\Laravel\Telescope\TelescopeServiceProvider::class); |
21 | 21 | //Telescope::night(); |
22 | 22 | |
23 | - Telescope::filter(function (IncomingEntry $entry) { |
|
23 | + Telescope::filter(function(IncomingEntry $entry) { |
|
24 | 24 | |
25 | 25 | if ($entry->type === EntryType::REQUEST |
26 | - && isset($entry->content['uri']) |
|
27 | - && str_contains($entry->content['uri'], 'horizon')) { |
|
26 | + && isset($entry->content[ 'uri' ]) |
|
27 | + && str_contains($entry->content[ 'uri' ], 'horizon')) { |
|
28 | 28 | return false; |
29 | 29 | } |
30 | 30 | |
@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | */ |
49 | 49 | protected function gate() |
50 | 50 | { |
51 | - Gate::define('viewTelescope', function ($user) { |
|
51 | + Gate::define('viewTelescope', function($user) { |
|
52 | 52 | return in_array($user->email, [ |
53 | 53 | // |
54 | 54 | ]); |
@@ -15,6 +15,6 @@ |
||
15 | 15 | { |
16 | 16 | public function serialize() |
17 | 17 | { |
18 | - return json_decode(json_encode($this->jsonSerialize()),true); |
|
18 | + return json_decode(json_encode($this->jsonSerialize()), true); |
|
19 | 19 | } |
20 | 20 | } |
@@ -26,22 +26,22 @@ |
||
26 | 26 | */ |
27 | 27 | public function resolve($request = null) |
28 | 28 | { |
29 | - return array_merge(parent::resolve($request),$this->filter($this->includeRelations())); |
|
29 | + return array_merge(parent::resolve($request), $this->filter($this->includeRelations())); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | protected function includeRelations() |
33 | 33 | { |
34 | - $relations = []; |
|
34 | + $relations = [ ]; |
|
35 | 35 | foreach ($this->relations as $relation) { |
36 | - if (is_string($relation) && method_exists(static::class, 'transform' . ucfirst(strtolower($relation)))) { |
|
37 | - $method = 'transform' . ucfirst(strtolower($relation)); |
|
36 | + if (is_string($relation) && method_exists(static::class, 'transform'.ucfirst(strtolower($relation)))) { |
|
37 | + $method = 'transform'.ucfirst(strtolower($relation)); |
|
38 | 38 | $data = $this->$method($this->resource); |
39 | 39 | if ($data instanceof JsonResource) { |
40 | 40 | $data->jsonSerialize(); |
41 | 41 | } |
42 | - $relations[strtolower($relation)] = $data; |
|
42 | + $relations[ strtolower($relation) ] = $data; |
|
43 | 43 | } else { |
44 | - throw new \Exception("invalid relation or not relation_transform_method given in " . get_short_class_name(static::class)); |
|
44 | + throw new \Exception("invalid relation or not relation_transform_method given in ".get_short_class_name(static::class)); |
|
45 | 45 | } |
46 | 46 | |
47 | 47 | } |
@@ -40,16 +40,16 @@ |
||
40 | 40 | */ |
41 | 41 | protected $table = 'users'; |
42 | 42 | |
43 | - protected $with = ['roles', 'permissions']; |
|
43 | + protected $with = [ 'roles', 'permissions' ]; |
|
44 | 44 | |
45 | 45 | public $cacheTime = 60; |
46 | 46 | |
47 | - public $secondaryCacheIndexes = ['identity_id']; |
|
47 | + public $secondaryCacheIndexes = [ 'identity_id' ]; |
|
48 | 48 | |
49 | 49 | /** |
50 | 50 | * @var array |
51 | 51 | */ |
52 | - protected $guarded = []; |
|
52 | + protected $guarded = [ ]; |
|
53 | 53 | |
54 | 54 | protected $casts = [ |
55 | 55 | 'email_verified' => 'bool' |