https://github.com/michael-rubel/laravel-sql-function-repository
Repository class to run SQL functions available in the PostgreSQL database
https://github.com/michael-rubel/laravel-sql-function-repository
database functions laravel looking-for-contributors mariadb mssqlserver mysql php postgresql sql sql-functions sqlite
Last synced: 4 months ago
JSON representation
Repository class to run SQL functions available in the PostgreSQL database
- Host: GitHub
- URL: https://github.com/michael-rubel/laravel-sql-function-repository
- Owner: michael-rubel
- License: mit
- Archived: true
- Created: 2022-05-26T08:11:36.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-19T12:02:15.000Z (about 3 years ago)
- Last Synced: 2024-09-25T18:53:08.634Z (over 1 year ago)
- Topics: database, functions, laravel, looking-for-contributors, mariadb, mssqlserver, mysql, php, postgresql, sql, sql-functions, sqlite
- Language: PHP
- Homepage:
- Size: 44.9 KB
- Stars: 7
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
- Security: .github/SECURITY.md
Awesome Lists containing this project
README

# Laravel SQL Function Repository
[](https://packagist.org/packages/michael-rubel/laravel-sql-function-repository)
[](https://packagist.org/packages/michael-rubel/laravel-sql-function-repository)
[](https://scrutinizer-ci.com/g/michael-rubel/laravel-sql-function-repository/?branch=main)
[](https://scrutinizer-ci.com/g/michael-rubel/laravel-sql-function-repository/?branch=main)
[](https://github.com/michael-rubel/laravel-sql-function-repository/actions)
[](https://github.com/michael-rubel/laravel-sql-function-repository/actions)
This package provides a repository class to run SQL functions available in the database.
Currently, only `PostgreSQL` database is supported, but if you want to add support for your database, contributions are welcomed.
---
The package requires `PHP 8` or higher and `Laravel 9` or higher.
## #StandWithUkraine
[](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)
## Installation
Install the package using composer:
```bash
composer require michael-rubel/laravel-sql-function-repository
```
Publish the config, set up basic connection and select:
```bash
php artisan vendor:publish --tag="sql-function-repository-config"
```
## Usage
```php
$repository = app(SqlFunctionRepository::class);
$repository->runDatabaseFunction('yourFunctionName', [
'functionParameter1',
'functionParameter2',
]);
```
## Testing
```bash
composer test
```
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.