Skip to content

Commit 1685048

Browse files
author
Afonso Gloeden
committed
Updated README.md file structure
1 parent 3e70e39 commit 1685048

File tree

1 file changed

+56
-24
lines changed

1 file changed

+56
-24
lines changed

README.md

Lines changed: 56 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,20 @@
11
# laravel-sybase
2+
23
Sybase ASE based Eloquent module extension for Laravel 5.x.
3-
- Enables use of multiple kinds of fields.
4-
- Use default eloquent: works with odbc and dblib!
5-
- Migrations! (WIP - Work in Progress)
4+
* Enables use of multiple kinds of fields.
5+
* Use default eloquent: works with odbc and dblib!
6+
* Migrations! (WIP - Work in Progress)
67

7-
### Install
8+
## Install
89

9-
Add the following in the require section of your **composer.json**:
10+
Add the following in the require section of your **composer.json**:
1011

11-
#### Laravel 5.1, 5.2, 5.3
12+
### Laravel 5.1, 5.2, 5.3
1213

1314
```json
1415
"uepg/laravel-sybase": "~1.0"
1516
```
16-
#### Laravel 5.4
17+
### Laravel 5.4, 5.5
1718

1819
```json
1920
"uepg/laravel-sybase": "~2.0"
@@ -25,20 +26,26 @@ Update the package dependencies executing:
2526
composer update
2627
```
2728

28-
Add the following entry to your providers array in **./config./app.php** file:
29+
Add the following entry to your providers array in **config/app.php** file:
2930

3031
```php
3132
Uepg\LaravelSybase\Database\SybaseServiceProvider::class
3233
```
3334

34-
Update your ./config./database.php's default driver with the settings for the **sqlsrv** or your custom odbc. See the following example:
35+
Update your **config/database.php's** default driver with the settings for the **sqlsrv** or your custom odbc. See the following example:
3536

3637
```php
38+
<?php
39+
40+
...
41+
42+
return [
43+
...
44+
3745
'connections' => [
38-
3946
...
4047

41-
'sybaseuepg-aluno' => [
48+
'sqlsrv' => [
4249
'driver' => 'sqlsrv',
4350
'host' => env('DB_HOST', 'sybase.myserver.br:5000'),
4451
'database' => env('DB_DATABASE', 'mydatabase'),
@@ -47,36 +54,61 @@ Update your ./config./database.php's default driver with the settings for the **
4754
'charset' => 'utf8',
4855
'prefix' => '',
4956
],
57+
58+
...
59+
],
60+
61+
...
62+
]
5063
```
5164

5265

53-
### Configuration of freetds driver
66+
## Configuration of freetds driver
5467

55-
In Linux systems the driver version must be set in `freetds.conf` file to the right use of charset pages.
68+
In Linux systems the driver version must be set in **freetds.conf** file to the right use of charset pages.
5669

57-
The file is usualy found in `/etc/freetds/freetds.conf`. Set the configuration at global section as the following example:
70+
The file is usualy found in **/etc/freetds/freetds.conf**. Set the configuration at global section as the following example:
5871

59-
[global]
60-
# TDS protocol version
61-
tds version = 5.0
72+
```text
73+
[global]
74+
# TDS protocol version
75+
tds version = 5.0
76+
```
77+
78+
## Setting to use numeric data type
6279

63-
### Setting to use numeric data type
64-
In the migration file you must replace include `use Illuminate\Database\Schema\Blueprint;` with include `use Uepg\LaravelSybase\Database\Schema\BlueprintSybase as Blueprint;`
80+
In the migration file you must replace `use Illuminate\Database\Schema\Blueprint;` with `use Uepg\LaravelSybase\Database\Schema\BlueprintSybase as Blueprint;`. See the following example:
6581

66-
Example:
6782
```php
68-
use Illuminate\Database\Migrations\Migration;
69-
//use Illuminate\Database\Schema\Blueprint;
70-
use Uepg\LaravelSybase\Database\Schema\BlueprintSybase as Blueprint;
83+
<?php
84+
85+
use Illuminate\Support\Facades\Schema;
86+
// use Illuminate\Database\Schema\Blueprint;
87+
use Uepg\LaravelSybase\Database\Schema\BlueprintSybase as Blueprint;
88+
use Illuminate\Database\Migrations\Migration;
7189

7290
class CreateTable extends Migration
7391
{
92+
/**
93+
* Run the migrations.
94+
*
95+
* @return void
96+
*/
7497
public function up()
7598
{
7699
Schema::create('table_name', function (Blueprint $table) {
77100
$table->numeric('column_name', length, autoIncrement);
78101
});
79102
}
80-
}
81103

104+
/**
105+
* Reverse the migrations.
106+
*
107+
* @return void
108+
*/
109+
public function down()
110+
{
111+
Schema::dropIfExists('table_name');
112+
}
113+
}
82114
```

0 commit comments

Comments
 (0)