Skip to content

Files

Latest commit

95393d9 · Aug 3, 2017

History

History
46 lines (37 loc) · 1.7 KB

README.md

File metadata and controls

46 lines (37 loc) · 1.7 KB

Laravel ORM for Microsoft Access DB

Latest Stable Version Total Downloads Latest Unstable Version License composer.lock

This package helps you to manage Microsoft Access DB by ODBC Connection with the integrated Laravel ORM.

Installation

  1. Install via composer
composer require zoilomora/laravel-msaccess
  1. Add Service Provider to config/app.php in providers section:
\ZoiloMora\AccessServiceProvider::class,
  1. Create a DSN with the connection to the database.

  2. Add connection to config/database.php in connections section:

'access' => [
    'driver' => 'pdo_access',
    'connection_string' => 'dsn={namedsn}',
    'username' => '',
    'password' => '',
    'table_prefix' => '',
]
  1. Replace {namedsn} with the name of DSN.

Connect model with the connection

  1. In the model class add the $connection variable like this:
protected $connection = 'access';

License

Licensed under the MIT license

Read LICENSE for more information