-
Notifications
You must be signed in to change notification settings - Fork 227
Laravel Telescope incompatibility #185
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
@zannix Thanks for reporting! Can you provide your complete stack trace for this error, as well as the eloquent query you are are running. I will try to reproduce. Better yet, if you have a public repo that already reproduces this issue, please link it here so I can investigate. :) Thanks! |
The issue was caused upon trying to instantiate and save a new model inside a static method of the model class by calling $model = new self(); .... $model->save(); Here is the full stack trace: #60 ErrorException in /vendor/laravel/telescope/src/Watchers/ModelWatcher.php:35 |
This is likely an issue with the laravel-pivot package, as model-caching does not fire events. See the following discussions: I believe this should be resolved once laravel-pivot 4.0 is released (no date on that though). |
…ty with laravel-telescope Fixes #185
I'm going to throw my 2 cents in here. There is some kind of interaction that is happening between this plugin and that one that triggers these kinds of errors. I say that because I am in the process of trying to add your auto-caching to my, relatively new, repo. When I make the call to my API endpoint without implementing model caching it returns just fine as is. HOWEVER, as soon as I add the Cacheable trait from this plugin it barfs with the following output.
I'm doing this through Postman, pardon the broken error listing. It refers to this file "var/www/vendor/fico7489/laravel-pivot/src/Traits/ExtendFireModelEventTrait.php" on line 36 It also outputs this code segment:
} This is on my local env running via Docksal. I upgraded to Laravel 5.8. Got v0.4.7 of this package, etc. Somehow these two do not play nicely together. I will report back when I find more out. |
@pthurmond Please see this issue: #219 |
Upon installing Laravel Telescope package, there seems to be an issue that's being caused by the incompatibility with laravel-model-caching.
The issue is also commented here: laravel/telescope#187
ErrorException thrown with message "Undefined offset: 0" in
/vendor/laravel/telescope/src/Watchers/ModelWatcher.php:35
When laravel-model-caching is disabled, everything operates normally.
The text was updated successfully, but these errors were encountered: