PHPackages                             michael-rubel/laravel-sql-function-repository - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. michael-rubel/laravel-sql-function-repository

AbandonedArchivedLibrary[Database &amp; ORM](/categories/database)

michael-rubel/laravel-sql-function-repository
=============================================

It is an example template for Laravel packages. Fill or change it the way you like.

1.1.2(3y ago)71.0k1MITPHPPHP ^8.0

Since May 26Pushed 3y ago1 watchersCompare

[ Source](https://github.com/michael-rubel/laravel-sql-function-repository)[ Packagist](https://packagist.org/packages/michael-rubel/laravel-sql-function-repository)[ Docs](https://github.com/michael-rubel/laravel-sql-function-repository)[ Fund](https://paypal.me/observername)[ RSS](/packages/michael-rubel-laravel-sql-function-repository/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (8)Versions (7)Used By (0)

[![Run database function](https://user-images.githubusercontent.com/37669560/176688279-9cae459f-d758-453a-80c1-cf1b345f9cc4.png)](https://user-images.githubusercontent.com/37669560/176688279-9cae459f-d758-453a-80c1-cf1b345f9cc4.png)

Laravel SQL Function Repository
===============================

[](#laravel-sql-function-repository)

[![Latest Version on Packagist](https://camo.githubusercontent.com/758bffd27061dc676df93f273e7f3d974c0a8613067bf2697426bdcd2ecc1c94/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d69636861656c2d727562656c2f6c61726176656c2d73716c2d66756e6374696f6e2d7265706f7369746f72792e7376673f7374796c653d666c61742d737175617265266c6f676f3d7061636b6167697374)](https://packagist.org/packages/michael-rubel/laravel-sql-function-repository)[![Total Downloads](https://camo.githubusercontent.com/050ec5f7046d59cd241851d2b7237156046fa0c38563147ae02018ba15f18e40/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d69636861656c2d727562656c2f6c61726176656c2d73716c2d66756e6374696f6e2d7265706f7369746f72792e7376673f7374796c653d666c61742d737175617265266c6f676f3d7061636b6167697374)](https://packagist.org/packages/michael-rubel/laravel-sql-function-repository)[![Code Quality](https://camo.githubusercontent.com/749297f35ccfe23ea010705e613c17bb186940a1ab45c4ec42e3c7a1d88231a5/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f7175616c6974792f672f6d69636861656c2d727562656c2f6c61726176656c2d73716c2d66756e6374696f6e2d7265706f7369746f72792e7376673f7374796c653d666c61742d737175617265266c6f676f3d7363727574696e697a6572)](https://scrutinizer-ci.com/g/michael-rubel/laravel-sql-function-repository/?branch=main)[![Code Coverage](https://camo.githubusercontent.com/887a08f4ccf8eeb677550a20542c785ffe63c782aad1ccb38f2f98021d1c918a/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6d69636861656c2d727562656c2f6c61726176656c2d73716c2d66756e6374696f6e2d7265706f7369746f72792e7376673f7374796c653d666c61742d737175617265266c6f676f3d7363727574696e697a6572)](https://scrutinizer-ci.com/g/michael-rubel/laravel-sql-function-repository/?branch=main)[![GitHub Tests Action Status](https://camo.githubusercontent.com/5de996138ef096e10c48bc74a5d5f2faa7fc95493f77da3afb4f29537055f317/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d69636861656c2d727562656c2f6c61726176656c2d73716c2d66756e6374696f6e2d7265706f7369746f72792f72756e2d74657374732e796d6c3f6272616e63683d6d61696e267374796c653d666c61742d737175617265266c6162656c3d7465737473266c6f676f3d676974687562)](https://github.com/michael-rubel/laravel-sql-function-repository/actions)[![PHPStan](https://camo.githubusercontent.com/10ff81b0d6cebb22360058bc4887bd1eda5372c1fcbf708385b2d8f27c477704/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6d69636861656c2d727562656c2f6c61726176656c2d73716c2d66756e6374696f6e2d7265706f7369746f72792f7068707374616e2e796d6c3f6272616e63683d6d61696e267374796c653d666c61742d737175617265266c6162656c3d6c6172617374616e266c6f676f3d6c61726176656c)](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
------------------

[](#standwithukraine)

[![SWUbanner](https://raw.githubusercontent.com/vshymanskyy/StandWithUkraine/main/banner2-direct.svg)](https://github.com/vshymanskyy/StandWithUkraine/blob/main/docs/README.md)

Installation
------------

[](#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
-----

[](#usage)

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

Testing
-------

[](#testing)

```
composer test
```

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~79 days

Total

4

Last Release

1214d ago

PHP version history (2 changes)1.0.0PHP ^8.0|^8.1

1.1.1PHP ^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/9c060c69332d50a7cb290529ad84a7f216dec94d59950db7446dc93208787083?d=identicon)[michael-rubel](/maintainers/michael-rubel)

---

Top Contributors

[![michael-rubel](https://avatars.githubusercontent.com/u/37669560?v=4)](https://github.com/michael-rubel "michael-rubel (28 commits)")

---

Tags

databasefunctionslaravellooking-for-contributorsmariadbmssqlservermysqlphppostgresqlsqlsql-functionssqlitelaraveldatabasesqlmichael-rubellaravel-sql-function-repository

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/michael-rubel-laravel-sql-function-repository/health.svg)

```
[![Health](https://phpackages.com/badges/michael-rubel-laravel-sql-function-repository/health.svg)](https://phpackages.com/packages/michael-rubel-laravel-sql-function-repository)
```

###  Alternatives

[illuminate/database

The Illuminate Database package.

2.8k52.4M9.4k](/packages/illuminate-database)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)[lacodix/laravel-model-filter

A Laravel package to filter, search and sort models with ease while fetching from database.

17649.9k](/packages/lacodix-laravel-model-filter)[orptech/laravel-migration-partition

Laravel extensions that extends Illuminate to enable partitioned table creation within Laravel migrations.

3426.7k](/packages/orptech-laravel-migration-partition)[calebdw/laravel-sql-entities

Manage SQL entities in Laravel with ease.

301.3k](/packages/calebdw-laravel-sql-entities)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
