Skip to content

Commit a185881

Browse files
authored
Create README.md
1 parent c383180 commit a185881

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# laravel-mysqlite
2+
[![Build Status](https://travis-ci.org/spam-n-eggs/laravel-mysqlite.svg?branch=master)](https://travis-ci.org/spam-n-eggs/laravel-mysqlite)
3+
4+
Laravel MySQLite is meant to be used in conjunction with Laravel. It is a wrapper class that adds select functions from MySQL to SQLite. See [Vectorface/MySQLite](https://github.com/Vectorface/MySQLite) for more details around what is included by default.
5+
# Usage
6+
## Adding the Composer Resource
7+
1. In your composer.json add the following line to the repositories section:
8+
```json
9+
{
10+
"type": "vcs",
11+
"url": "https://github.com/spam-n-eggs/laravel-mysqlite.git"
12+
}
13+
```
14+
1. Execute `composer require spam-n-eggs/laravel-mysqlite`
15+
16+
## Registering as a Service Provider
17+
In order to provide clutter it is preferable to create a separate Service Provider
18+
1. Create a new class in `app/Providers` that extends `Mhorninger\SQLite\MySQLiteServiceProvider`
19+
20+
```php
21+
<?php
22+
namespace App\Providers;
23+
24+
use Mhorninger\SQLite\MySQLiteServiceProvider as ServiceProvider;
25+
26+
class MySQLiteServiceProvider extends ServiceProvider
27+
{
28+
public function register()
29+
{
30+
if ($shouldRegister) {
31+
parent::register();
32+
}
33+
}
34+
}
35+
```
36+
1. Add a line to `app/Providers/AppServiceProvider.php` within the `register()` method:
37+
```php
38+
$this->app->register(MySQLiteServiceProvider::class);
39+
```

0 commit comments

Comments
 (0)