Skip to content

Commit

Permalink
Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
zoilomora committed Aug 3, 2017
1 parent a084d8c commit 95393d9
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# Laravel ORM for Microsoft Access DB

[![Latest Stable Version](https://poser.pugx.org/zoilomora/laravel-msaccess/v/stable)](https://packagist.org/packages/zoilomora/laravel-msaccess)
[![Total Downloads](https://poser.pugx.org/zoilomora/laravel-msaccess/downloads)](https://packagist.org/packages/zoilomora/laravel-msaccess)
[![Latest Unstable Version](https://poser.pugx.org/zoilomora/laravel-msaccess/v/unstable)](https://packagist.org/packages/zoilomora/laravel-msaccess)
Expand All @@ -9,8 +8,39 @@
This package helps you to manage **Microsoft Access DB** by **ODBC Connection**
with the integrated [Laravel](https://github.com/laravel/laravel) ORM.

## License
## Installation
1) Install via composer
```
composer require zoilomora/laravel-msaccess
```

2) Add Service Provider to `config/app.php` in `providers` section:
```php
\ZoiloMora\AccessServiceProvider::class,
```

3) Create a **DSN** with the connection to the database.

4) Add connection to `config/database.php` in `connections` section:
```php
'access' => [
'driver' => 'pdo_access',
'connection_string' => 'dsn={namedsn}',
'username' => '',
'password' => '',
'table_prefix' => '',
]
```

5) Replace `{namedsn}` with the **name of DSN**.

## Connect model with the connection
1) In the model class add the `$connection` variable like this:
```php
protected $connection = 'access';
```

## License
Licensed under the [MIT license](http://opensource.org/licenses/MIT)

Read [LICENSE](LICENSE) for more information

0 comments on commit 95393d9

Please sign in to comment.