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.
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"
$repository = app(SqlFunctionRepository::class);
$repository->runDatabaseFunction('yourFunctionName', [
'functionParameter1',
'functionParameter2',
]);
composer test
The MIT License (MIT). Please see License File for more information.