You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-8Lines changed: 20 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -59,7 +59,8 @@ return [
59
59
'password' => env('DB_PASSWORD', 'password'),
60
60
'charset' => 'utf8',
61
61
'prefix' => '',
62
-
'cache' => true // By default it caches on all connections, if you want some connection not remembered assign `false` (Recommended when modification is performed on tables frequently [development])
62
+
'cache_tables' => true,
63
+
'cache_time' => 3600
63
64
],
64
65
65
66
...
@@ -97,19 +98,30 @@ The file is usualy found in **/etc/freetds/freetds.conf**. Set the configuration
97
98
```
98
99
99
100
## Configuring the charset between the database and the application
100
-
To configure the charset between the database and the application, add the fields `SYBASE_DATABASE_CHARSET` and `SYBASE_APPLICATION_CHARSET` in `.env` file, see the following example:
101
+
This package offers to method to charset conversion, it can be converted in application layer or in database layer, we offered both methods because it can be useful for debugging, to config the application layer conversion you need to set up the following entries on the `database.php` file. You can view an example of the application encoding setup below:
102
+
103
+
```database
104
+
'sybase' =>
105
+
[
106
+
'application_encoding' => true,
107
+
'application_charset' => '',
108
+
'sybase_database_charset' => ''
109
+
],
110
+
```
101
111
102
-
```env
103
-
SYBASE_DATABASE_CHARSET=CP850
104
-
SYBASE_APPLICATION_CHARSET=UTF8
112
+
```charset
113
+
'charset' => 'utf8',
105
114
```
115
+
116
+
To use the database layer conversion add the property charset to connection configuration on `database.php`
117
+
106
118
## Configuring the cache
107
119
As the library consults table information whenever it receives a request, caching can be used to avoid excessive queries
108
120
109
-
To use the cache, add the fields `SYBASE_CACHE_TABLES` and `SYBASE_CACHE_TABLES_TIME`to the `.env` file, see the following example:
121
+
To use the cache, add the property `cache_tables`to the database.php connection configuration, you can customize the time of the cache with the property `cache_time` in the same configuration
110
122
```dotenv
111
-
SYBASE_CACHE_TABLES=true
112
-
SYBASE_CACHE_TABLES_TIME=3600 # cache table information by `3600` seconds
0 commit comments