Looking to hire Laravel developers? Try LaraJobs

laravel-sql-function-repository maintained by michael-rubel

Description
It is an example template for Laravel packages. Fill or change it the way you like.
Author
Last update
2023/01/19 13:01 (dev-main)
License
Downloads
1 042

Comments
comments powered by Disqus

Run database function

Laravel SQL Function Repository

Latest Version on Packagist Total Downloads Code Quality Code Coverage GitHub Tests Action Status PHPStan

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

SWUbanner

Installation

Install the package using composer:

composer require michael-rubel/laravel-sql-function-repository

Publish the config, set up basic connection and select:

php artisan vendor:publish --tag="sql-function-repository-config"

Usage

$repository = app(SqlFunctionRepository::class);
$repository->runDatabaseFunction('yourFunctionName', [
    'functionParameter1',
    'functionParameter2',
]);

Testing

composer test

License

The MIT License (MIT). Please see License File for more information.