Skip to content

Commit

Permalink
Add package auto discovery feature compatibility from Laravel 5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
cooperl22 committed Sep 21, 2017
1 parent 8331aa8 commit 8e1c1c2
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 37 deletions.
18 changes: 0 additions & 18 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# laravel-db2

[![Latest Stable Version](https://poser.pugx.org/cooperl/laravel-db2/v/stable)](https://packagist.org/packages/cooperl/laravel-db2)
[![Total Downloads](https://poser.pugx.org/cooperl/laravel-db2/downloads)](https://packagist.org/packages/cooperl/laravel-db2)
[![Latest Unstable Version](https://poser.pugx.org/cooperl/laravel-db2/v/unstable)](https://packagist.org/packages/cooperl/laravel-db2)
Expand All @@ -11,38 +10,22 @@ It provides DB2 Connection by extending the Illuminate Database component of the
---

- [Installation](#installation)
- [Registering the Package](#registering-the-package)
- [Configuration](#configuration)
- [Usage](#usage)

## Installation

Add laravel-db2 to your composer.json file:

```
"require": {
"cooperl/laravel-db2": "~5.4"
}
```

Use [composer](http://getcomposer.org) to install this package.

```
$ composer update
```

### Registering the Package

Add the laravel-db2 Service Provider to your config in ``app/config/app.php``:

```php
'providers' => [
'Cooperl\Database\DB2\DB2ServiceProvider'
],
```

### Configuration

There are two ways to configure laravel-db2. You can choose the most convenient way for you. You can put your DB2 credentials into ``app/config/database.php`` (option 1) file or use package config file which you can generate through command line by artisan (option 2).

Please check appropriate specific DSN parameters for your connection.
Expand All @@ -54,7 +37,6 @@ For PHP applications using the UTF8 locale the workaround to prevent the extra g
DEBUG = 65536

#### Option 1: Configure DB2 using ``app/config/database.php`` file

Simply add this code at the end of your ``app/config/database.php`` file:

```php
Expand Down
52 changes: 33 additions & 19 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,22 +1,36 @@
{
"name": "cooperl/laravel-db2",
"description": "laravel-db2 is a simple DB2 service provider for Laravel. It provides DB2 Connection by extending the Illuminate Database component of the laravel framework.",
"keywords": ["laravel", "DB2", "Database", "PDO", "ODBC"],
"license": "MIT",
"authors": [
{
"name": "Maxime Rault",
"role": "Developer"
}
],
"require": {
"php": ">=5.6.4"
},
"require-dev": {
},
"autoload": {
"psr-4": {
"Cooperl\\Database\\DB2\\": "src/"
}
"name": "cooperl/laravel-db2",
"description": "laravel-db2 is a simple DB2 service provider for Laravel. It provides DB2 Connection by extending the Illuminate Database component of the laravel framework.",
"keywords": [
"laravel",
"DB2",
"Database",
"PDO",
"ODBC"
],
"license": "MIT",
"authors": [
{
"name": "Maxime Rault",
"role": "Developer"
}
],
"require": {
"php": ">=7.0.0",
"laravel/framework": "5.5.*"
},
"require-dev": {
},
"autoload": {
"psr-4": {
"Cooperl\\Database\\DB2\\": "src/"
}
},
"extra": {
"laravel": {
"providers": [
"Cooperl\\Database\\DB2\\DB2ServiceProvider"
]
}
}
}

0 comments on commit 8e1c1c2

Please sign in to comment.