Skip to content
This repository was archived by the owner on Nov 27, 2020. It is now read-only.

Commit 95393d9

Browse files
committed
Documentation
1 parent a084d8c commit 95393d9

File tree

1 file changed

+32
-2
lines changed

1 file changed

+32
-2
lines changed

README.md

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# Laravel ORM for Microsoft Access DB
2-
32
[![Latest Stable Version](https://poser.pugx.org/zoilomora/laravel-msaccess/v/stable)](https://packagist.org/packages/zoilomora/laravel-msaccess)
43
[![Total Downloads](https://poser.pugx.org/zoilomora/laravel-msaccess/downloads)](https://packagist.org/packages/zoilomora/laravel-msaccess)
54
[![Latest Unstable Version](https://poser.pugx.org/zoilomora/laravel-msaccess/v/unstable)](https://packagist.org/packages/zoilomora/laravel-msaccess)
@@ -9,8 +8,39 @@
98
This package helps you to manage **Microsoft Access DB** by **ODBC Connection**
109
with the integrated [Laravel](https://github.com/laravel/laravel) ORM.
1110

12-
## License
11+
## Installation
12+
1) Install via composer
13+
```
14+
composer require zoilomora/laravel-msaccess
15+
```
16+
17+
2) Add Service Provider to `config/app.php` in `providers` section:
18+
```php
19+
\ZoiloMora\AccessServiceProvider::class,
20+
```
21+
22+
3) Create a **DSN** with the connection to the database.
1323

24+
4) Add connection to `config/database.php` in `connections` section:
25+
```php
26+
'access' => [
27+
'driver' => 'pdo_access',
28+
'connection_string' => 'dsn={namedsn}',
29+
'username' => '',
30+
'password' => '',
31+
'table_prefix' => '',
32+
]
33+
```
34+
35+
5) Replace `{namedsn}` with the **name of DSN**.
36+
37+
## Connect model with the connection
38+
1) In the model class add the `$connection` variable like this:
39+
```php
40+
protected $connection = 'access';
41+
```
42+
43+
## License
1444
Licensed under the [MIT license](http://opensource.org/licenses/MIT)
1545

1646
Read [LICENSE](LICENSE) for more information

0 commit comments

Comments
 (0)