File tree 1 file changed +10
-7
lines changed
1 file changed +10
-7
lines changed Original file line number Diff line number Diff line change 4
4
5
5
use Closure ;
6
6
use Illuminate \Contracts \View \Factory ;
7
+ use Illuminate \Contracts \View \View as ViewContract ;
7
8
use Illuminate \Support \Str ;
8
9
use Illuminate \View \View ;
9
10
use Laravel \Telescope \IncomingEntry ;
@@ -38,15 +39,17 @@ public function recordAction($event, $data)
38
39
return ;
39
40
}
40
41
41
- /** @var View $view */
42
+ /** @var ViewContract $view */
42
43
$ view = $ data [0 ];
43
44
44
- Telescope::recordView (IncomingEntry::make (array_filter ([
45
- 'name ' => $ view ->getName (),
46
- 'path ' => $ this ->extractPath ($ view ),
47
- 'data ' => $ this ->extractKeysFromData ($ view ),
48
- 'composers ' => $ this ->formatComposers ($ view ),
49
- ])));
45
+ if ($ view instanceof View) {
46
+ Telescope::recordView (IncomingEntry::make (array_filter ([
47
+ 'name ' => $ view ->getName (),
48
+ 'path ' => $ this ->extractPath ($ view ),
49
+ 'data ' => $ this ->extractKeysFromData ($ view ),
50
+ 'composers ' => $ this ->formatComposers ($ view ),
51
+ ])));
52
+ }
50
53
}
51
54
52
55
/**
You can’t perform that action at this time.
0 commit comments