1. Go to this page and download the library: Download uepg/laravel-sybase library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
...
return [
...
'connections' => [
...
'sybase' => [
'driver' => 'sybasease',
'host' => env('DB_HOST', 'sybase.myserver.com'),
'port' => env('DB_PORT', '5000'),
'database' => env('DB_DATABASE', 'mydatabase'),
'username' => env('DB_USERNAME', 'user'),
'password' => env('DB_PASSWORD', 'password'),
'charset' => 'utf8',
'prefix' => '',
'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])
],
...
],
...
]
use Illuminate\Support\Facades\Schema;
// use Illuminate\Database\Schema\Blueprint;
use Uepg\LaravelSybase\Database\Schema\Blueprint; // or "use UepgBlueprint as Blueprint"
use Illuminate\Database\Migrations\Migration;
class CreateTable extends Migration
{
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('table_name', function (Blueprint $table) {
$table->numeric('column_name', length, autoIncrement);
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::dropIfExists('table_name');
}
}
text
[global]
# TDS protocol version
tds version = 5.0
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.