PHPackages                             padosoft/laravel-support - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. padosoft/laravel-support

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

padosoft/laravel-support
========================

support helpers, extended providers etc.. for laravel

1.7.0(1y ago)214.1k↓45%1[2 PRs](https://github.com/padosoft/laravel-support/pulls)MITPHPPHP ^7.2.5|^8.0|^8.1

Since Sep 3Pushed 9mo ago2 watchersCompare

[ Source](https://github.com/padosoft/laravel-support)[ Packagist](https://packagist.org/packages/padosoft/laravel-support)[ Docs](https://github.com/padosoft/laravel-support)[ RSS](/packages/padosoft-laravel-support/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (9)Versions (15)Used By (0)

Laravel-support
===============

[](#laravel-support)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f7b087d46bb8600f6a4a46610ad530e5b381fa9dee2111386bd9e5e8be7a5deb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7061646f736f66742f6c61726176656c2d737570706f72742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/padosoft/laravel-support)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/03369229d7708877849378df41397f06f8b8108ba42b2f32fb9656ab96483237/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7061646f736f66742f6c61726176656c2d737570706f72742f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/padosoft/laravel-support)[![Quality Score](https://camo.githubusercontent.com/1e285a2f77a275b2b416432700a59ba6a575b8eee7d3970106f94868d9d10e6e/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f7061646f736f66742f6c61726176656c2d737570706f72742e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/padosoft/laravel-support)[![Total Downloads](https://camo.githubusercontent.com/36eb1ae61f6a7af5e1c6a2560e1267462b3c7a30aa4ba158d5f099a37a3358e2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7061646f736f66742f6c61726176656c2d737570706f72742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/padosoft/laravel-support)

Laravel-support package is a collection of helpers and tools for Laravel projects.

\##Requires

- php: &gt;=7.0.0
- illuminate/database: ^5.0
- illuminate/support: ^5.0
- illuminate/auth: ^5.0
- illuminate/contracts: ^5.0

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

[](#installation)

You can install the package via composer:

```
$ composer require padosoft/laravel-support
```

List of functions
-----------------

[](#list-of-functions)

- validate
- locale
- userIsLogged
- query\_interpolate
- queries
- query\_table

Usage
-----

[](#usage)

Here is some support method:

Using helper for laravel validator:

```
echo validate('192.168.0.1', 'ip'); //true
echo validate('dfdsfdsfs', 'ip'); //false
echo validate('20150230', 'date'); //false
echo validate('20150227', 'date'); //true
```

Using locale() helper:

```
echo locale();  //'en'
this->app->setLocale('it');
echo locale(); 'it'
```

Using query\_interpolate() helper:

```
$query = 'update "users" set "remember_token" = ? where "id" = ?';
$bindings = [
    0 => "dfsf234wdfsafsdfsdf",
    1 => "1"
];
$result = query_interpolate($query, $bindings);
echo $result; //update "users" set "remember_token" = 'dfsf234wdfsafsdfsdf' where "id" = 1
```

Using queries() helper:

```
//You need enable query log by calling:
\DB::enableQueryLog();

//If you have more than one DB connection you must specify it and Enables query log for my_connection
\DB::connection('my_connection')->enableQueryLog();

//query the db
User::first();
User::first();
User::first();

$queries = queries();
dd($result);
```

The output is:

```
[
  "query" => "select * from `negozi` where `id` = ?",
  "bindings" => [343242342,],
  "time" => 1.77,
  "look" => "select * from `negozi` where `id` = 343242342",
]
```

```
//If you want to print interpolated queries and relative time
foreach ($queries as $query) {
    echo 'e($query['look']) . "\t" . e($query['time']) . PHP_EOL;
}

//For performance and memory reasons, after get queries info, you can disable query log by excecute
\DB::disableQueryLog();
//or in case of more db connections:
\DB::connection('my_connection')->disableQueryLog();
```

Using query\_table() helper:

```
\DB::enableQueryLog();
User::first();
User::first();
User::first();
echo query_table();//print html table with queries
\DB::disableQueryLog();
```

Using current\_user() helper:

```
echo current_user(); //false
$user = User::first();
Auth::login($user);
var_dump(current_user()); //sump current logged user
echo current_user('id'); //1
echo current_user('email'); //test@user.com
```

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email instead of using the issue tracker.

Credits
-------

[](#credits)

- [Lorenzo Padovani](https://github.com/lopadova)
- [All Contributors](../../contributors)

About Padosoft
--------------

[](#about-padosoft)

Padosoft () is a software house based in Florence, Italy. Specialized in E-commerce and web sites.

License
-------

[](#license)

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

###  Health Score

47

—

FairBetter than 94% of packages

Maintenance52

Moderate activity, may be stable

Popularity29

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity79

Established project with proven stability

 Bus Factor1

Top contributor holds 60% 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 ~285 days

Recently: every ~298 days

Total

12

Last Release

407d ago

PHP version history (3 changes)1.0.0PHP &gt;=7.0.0

1.2.0PHP ^7.2.5

1.3.1PHP ^7.2.5|^8.0|^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/9fabb1f16f7a29a235494893175d25d51628fe2a6c9052834e35abe0666c9a8e?d=identicon)[lopadova](/maintainers/lopadova)

---

Top Contributors

[![lopadova](https://avatars.githubusercontent.com/u/10467699?v=4)](https://github.com/lopadova "lopadova (9 commits)")[![leopado](https://avatars.githubusercontent.com/u/20923180?v=4)](https://github.com/leopado "leopado (5 commits)")[![bramato](https://avatars.githubusercontent.com/u/4388004?v=4)](https://github.com/bramato "bramato (1 commits)")

---

Tags

helperslaravellaravel-packagelaravel-supportpadosoftLaravel-Support

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/padosoft-laravel-support/health.svg)

```
[![Health](https://phpackages.com/badges/padosoft-laravel-support/health.svg)](https://phpackages.com/packages/padosoft-laravel-support)
```

###  Alternatives

[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M532](/packages/laravel-passport)[spatie/laravel-enum

Laravel Enum support

3655.4M31](/packages/spatie-laravel-enum)[psalm/plugin-laravel

Psalm plugin for Laravel

3274.9M308](/packages/psalm-plugin-laravel)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[yadahan/laravel-authentication-log

Laravel Authentication Log provides authentication logger and notification for Laravel.

416632.8k5](/packages/yadahan-laravel-authentication-log)[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)

PHPackages © 2026

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