https://github.com/ivan770/laravel-firestore-cache
Cloud Firestore driver for Laravel cache
https://github.com/ivan770/laravel-firestore-cache
Last synced: about 2 months ago
JSON representation
Cloud Firestore driver for Laravel cache
- Host: GitHub
- URL: https://github.com/ivan770/laravel-firestore-cache
- Owner: ivan770
- License: mit
- Created: 2019-05-31T06:53:54.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2019-05-31T07:20:25.000Z (about 7 years ago)
- Last Synced: 2025-02-24T05:02:48.828Z (over 1 year ago)
- Language: PHP
- Size: 11.7 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Cloud Firestore cache for Laravel
## Installation
`composer require ivan770/laravel-firestore-cache`
## Configuration
1. Register service provider in `config/app.php`
```php
Ivan770\Firestore\FirestoreServiceProvider::class,
```
2. Add `firestore` config to `config/cache.php`
```php
'firestore' => [
'driver' => 'firestore',
'id' => env('FIRESTORE_ID'),
'key' => env('GOOGLE_APPLICATION_CREDENTIALS'),
'collection' => env("FIRESTORE_COLLECTION", 'cache'),
]
```
3. Configure your .env
```dotenv
CACHE_DRIVER=firestore
FIRESTORE_ID=project_id
GOOGLE_APPLICATION_CREDENTIALS=path_to_key_file
```
## Usage
[Laravel documentation](https://laravel.com/docs/5.8/cache)