Skip to content

Commit 136ca40

Browse files
authored
Merge pull request #25 from uepg/dev
Improving documentation with connection sample
2 parents c760494 + 7a1e74e commit 136ca40

File tree

1 file changed

+39
-6
lines changed

1 file changed

+39
-6
lines changed

README.md

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,50 @@
22
Sybase ASE based Eloquent module extension for Laravel 5.x.
33
- Enables use of multiple kinds of fields.
44
- Use default eloquent: works with odbc and dblib!
5-
- Migrations! (alpha)
5+
- Migrations! (WIP - Work in Progress)
66

77
### Install
8-
- Require in your **composer.json** this package: ``"uepg/laravel-sybase": "1.*"``
9-
- Run ``composer update``
10-
- Add to your providers in **./config./app.php**: ``Uepg\LaravelSybase\Database\SybaseServiceProvider::class``
11-
- Update your **./config./database.php**'s default driver to **sqlsrv** or your custom odbc.
8+
9+
Add the following in the require section of your **composer.json**:
10+
11+
```json
12+
"uepg/laravel-sybase": "1.*"
13+
```
14+
15+
Update the package dependencies executing:
16+
17+
```shell
18+
composer update
19+
```
20+
21+
Add the following entry to your providers array in **./config./app.php** file:
22+
23+
```php
24+
Uepg\LaravelSybase\Database\SybaseServiceProvider::class
25+
```
26+
27+
Update your ./config./database.php's default driver with the settings for the **sqlsrv** or your custom odbc. See the following example:
28+
29+
```php
30+
'connections' => [
31+
32+
...
33+
34+
'sybaseuepg-aluno' => [
35+
'driver' => 'sqlsrv',
36+
'host' => env('DB_HOST', 'sybase.myserver.br:5000'),
37+
'database' => env('DB_DATABASE', 'mydatabase'),
38+
'username' => env('DB_USERNAME', 'forge'),
39+
'password' => env('DB_PASSWORD', 'secret'),
40+
'charset' => 'utf8',
41+
'prefix' => '',
42+
],
43+
```
44+
1245

1346
### Configuration of freetds driver
1447

15-
In Linux systems the driver version must be set in `freetds.conf` to the right use of charset pages.
48+
In Linux systems the driver version must be set in `freetds.conf` file to the right use of charset pages.
1649

1750
The file is usualy found in `/etc/freetds/freetds.conf`. Set the configuration at global section as the following example:
1851

0 commit comments

Comments
 (0)