laravel / telescope

An elegant debug assistant for the Laravel framework.
https://laravel.com/docs/telescope
MIT License
4.89k stars 586 forks source link

How to use telescope with moloquent / mongodb? #494

Closed yuvraj993 closed 5 years ago

yuvraj993 commented 5 years ago

{message: "Call to a member function prepare() on null",…} exception: "Symfony\Component\Debug\Exception\FatalThrowableError" file: "/var/www/html/broc/vendor/laravel/framework/src/Illuminate/Database/Connection.php" line: 326 message: "Call to a member function prepare() on null" trace: [,…]

paras-malhotra commented 5 years ago

See https://github.com/laravel/telescope/issues/371

yuvraj993 commented 5 years ago

I found the solution :)

You need to extend EntryModel which is in vendor/laravel/telescope/src/Storage/DatabaseEntriesRepository.php location of the telescope package and set moloquent connection there.

i.e.

//use Illuminate\Database\Eloquent\Model; use Moloquent as Model;

class EntryModel extends Model