|
2 | 2 | Sybase ASE based Eloquent module extension for Laravel 5.x. |
3 | 3 | - Enables use of multiple kinds of fields. |
4 | 4 | - Use default eloquent: works with odbc and dblib! |
5 | | -- Migrations! (alpha) |
| 5 | +- Migrations! (WIP - Work in Progress) |
6 | 6 |
|
7 | 7 | ### 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 | + |
12 | 45 |
|
13 | 46 | ### Configuration of freetds driver |
14 | 47 |
|
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. |
16 | 49 |
|
17 | 50 | The file is usualy found in `/etc/freetds/freetds.conf`. Set the configuration at global section as the following example: |
18 | 51 |
|
|
0 commit comments