This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.
You can install the package via composer:
composer require alixcan/laravelsapmodels
Publish the config file with:
php artisan vendor:publish --tag="laravelsapmodels-config"
This is the contents of the published config file:
return [
'driver' => env('SAP_DATABASE_DRIVER', 'SAP'),
];
Edit config/database.php
file
'connections' => [
...
'sapConnectionDriver' => [
'driver' => 'sqlsrv',
'url' => env('DATABASE_URL'),
'port' => 1433,
'database' => env('SAP_DATABASE_DATABASE'),
'username' => env('SAP_DATABASE_USERNAME'),
'password' => env('SAP_DATABASE_PASSWORD'),
'charset' => 'utf8',
'prefix' => '',
'prefix_indexes' => true,
//'read' => [
// 'host' => env('SAP_DATABASE_HOST'),
//],
//'write' => [
// 'host' => env('SAP_DATABASE_HOST'),
//]
'host' => env('SAP_DATABASE_HOST'),
//'encrypt' => 'yes', // alternatively, defer to an env variable
//'trust_server_certificate' => 'true', // alternatively, defer to an env variable
],
...
],
Create your .env
variables
SAP_DATABASE_DRIVER=
SAP_DATABASE_DATABASE=
SAP_DATABASE_USERNAME=
SAP_DATABASE_PASSWORD=
SAP_DATABASE_HOST=
You can publish and use the models with:
php artisan laravelsapmodels:generate --module=HumanResources
- HumanResources
- MRP
- Reports
- SalesOpportunities
- Banking
- Finance
- General
- Service
- Business Partners
- Inventory and Production
- Marketing Documents
- Administration
- all
return \App\Models\SAP\HumanResources\OHTR::all();
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.