Laravel Telescope - using File as Storage Driver #47265
-
i want to store telescope entries in file instead of database but i am unable to figure it out can anyone help? is it even possible to use file as storage driver.
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I don't know if there is any other driver for telescope but what you can do is create a dedicated database for telescope. It will act as an unique file to store your telescope entries and they will not be present in your main database. For that :
'connections' => [
'telescope_sqlite' => [
'driver' => 'sqlite',
'url' => env('TELESCOPE_DATABASE_URL'),
'database' => env('TELESCOPE_DB_DATABASE', database_path('telescope.sqlite')),
'prefix' => '',
'foreign_key_constraints' => env('TELESCOPE_DB_FOREIGN_KEYS', true),
],
// ...
],
'driver' => env('TELESCOPE_DRIVER', 'database'),
'storage' => [
'database' => [
'connection' => env('TELESCOPE_DB_CONNECTION', 'telescope_sqlite'),
'chunk' => 1000,
],
],
Hope it will help you! |
Beta Was this translation helpful? Give feedback.
I don't know if there is any other driver for telescope but what you can do is create a dedicated database for telescope. It will act as an unique file to store your telescope entries and they will not be present in your main database.
For that :
Create a telescope.sqlite file under database folder
In config/database.php, create a new connection with sqlite driver