Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/melihovv/eloquent-presence-verifier
Perform presence verification through eloquent Model class instead of DB facade
https://github.com/melihovv/eloquent-presence-verifier
eloquent laravel presence-verification
Last synced: 7 days ago
JSON representation
Perform presence verification through eloquent Model class instead of DB facade
- Host: GitHub
- URL: https://github.com/melihovv/eloquent-presence-verifier
- Owner: melihovv
- License: mit
- Created: 2017-09-14T21:59:41.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2020-03-07T15:59:32.000Z (over 4 years ago)
- Last Synced: 2024-04-23T20:05:17.603Z (7 months ago)
- Topics: eloquent, laravel, presence-verification
- Language: PHP
- Size: 42 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Eloquent Presence Verifier
[![GitHub Workflow Status](https://github.com/melihovv/eloquent-presence-verifier/workflows/Run%20tests/badge.svg)](https://github.com/melihovv/eloquent-presence-verifier/actions)
[![styleci](https://styleci.io/repos/103585916/shield)](https://styleci.io/repos/103585916)[![Packagist](https://img.shields.io/packagist/v/melihovv/eloquent-presence-verifier.svg)](https://packagist.org/packages/melihovv/eloquent-presence-verifier)
[![Packagist](https://poser.pugx.org/melihovv/eloquent-presence-verifier/d/total.svg)](https://packagist.org/packages/melihovv/eloquent-presence-verifier)
[![Packagist](https://img.shields.io/packagist/l/melihovv/eloquent-presence-verifier.svg)](https://packagist.org/packages/melihovv/eloquent-presence-verifier)Perform presence verification through eloquent Model class instead of DB facade.
## Motivation
Awesome package for database query caching [spiritix/lada-cache](https://github.com/spiritix/lada-cache) demands
that all database queries should be ran from Eloquent Model subclasses which has `LadaCacheTrait`. But if you use
some of the following validations rules `exists:users,id` or `unique:users,email` Laravel run queries through `DB`
facade.## Installation
Install via composer
```
composer require melihovv/eloquent-presence-verifier
```### Publish Configuration File
```
php artisan vendor:publish --provider="Melihovv\EloquentPresenceVerifier\ServiceProvider" --tag="config"
```In this config you can specify custom model though which all queries will be send.
For `spiritix/lada-cache` users:- create `App\Models\TempModel`
```php
\App\Models\TempModel::class,
];
```## Usage
You don't need to do anything. All is done in this package service provider: EloquentPresenceVerifier is set as default
presence verificator instead of DatabasePresenceVerifier.## Security
If you discover any security related issues, please email [email protected]
instead of using the issue tracker.## Credits
- [Alexander Melihov](https://github.com/melihovv/eloquent-presence-verifier)
- [All contributors](https://github.com/melihovv/eloquent-presence-verifier/graphs/contributors)This package is bootstrapped with the help of [melihovv/laravel-package-generator](https://github.com/melihovv/laravel-package-generator).