PHPackages                             tommyys/laravel\_library - 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. tommyys/laravel\_library

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

tommyys/laravel\_library
========================

Default Laravel library for Axstarzy Dot Com that includes the most used libraries, plugins, helper classes, and migrations

1.4.13(5y ago)11.1k2[1 PRs](https://github.com/tommyys/laravel-library/pulls)PHPPHP ^7.0

Since Apr 25Pushed 5y ago1 watchersCompare

[ Source](https://github.com/tommyys/laravel-library)[ Packagist](https://packagist.org/packages/tommyys/laravel_library)[ RSS](/packages/tommyys-laravel-library/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (10)Dependencies (4)Versions (41)Used By (0)

Axstarzy Laravel Library
========================

[](#axstarzy-laravel-library)

Default Laravel library for Axstarzy Dot Com that includes the most used libraries, plugins, helper classes, and migrations

Getting Started
---------------

[](#getting-started)

**Note that this package is in constant development and update. Please do voice out if you have any suggestions for improvement on this package.**

This package is meant for Laravel Framework 5.5 LTS and above.

##### The following packages will be auto installed:

[](#the-following-packages-will-be-auto-installed)

- guzzlehttp/guzzle^6.3
- intervention/image^2.4
- laravelcollective/html^5.4.0
- funkjedi/composer-include-files^1.0,

##### Helper classes included:

[](#helper-classes-included)

- Action Log
- Error Log

##### Helper functions included:

[](#helper-functions-included)

- sqlLog
- custom trans
- getStatusLabel

### Prerequisites

[](#prerequisites)

- PHP 7.0 and above
- Laravel 5.5 and above

### Installing

[](#installing)

1. Install the package in your project

```
composer require tommyys/laravel_library

```

2. Add your providers to the `providers` array of `config/app.php`:

```
'providers' => [
    // ...
    Collective\Html\HtmlServiceProvider::class,
    Intervention\Image\ImageServiceProvider::class,
    // ...
],
```

3. Add class aliases to the `aliases` array of `config/app.php`:

```
'aliases' => [
    // ...
      'Form' => Collective\Html\FormFacade::class,
      'Html' => Collective\Html\HtmlFacade::class,
      'Image' => Intervention\Image\Facades\Image::class,
    // ...
  ],
```

4. To use the included helper class, add this line into your project's `composer.json`.

```
"extra": {
        ...
        "include_files": [
            "vendor/tommyys/laravel_library/src/Helper.php"
        ]
    },
```

5. Run `composer dumpautoload`
6. Run `php artisan migrate` to migrate the required tables

### Using the library

[](#using-the-library)

To use the included classes, include the namespace on top of your controller/command.

```
...
use Axstarzy\LaravelLibrary\ActionLog;
use Axstarzy\LaravelLibrary\ErrorLog;
use Axstarzy\LaravelLibrary\Telegram;
...
```

Below are the classes that are available:

- ActionLog
- ErrorLog
- Telegram

Then you may use it normally like a helper class in your controller/commands.

```
//create new action log
$log = ActionLog::createRecord($request, $user); //$user is optional, if variable not passed it will use auth()->user() by default

//check time gap between last request
$gap = ActionLog::check30sGap($request);
```

To setup Telegram, add these variables to your `.env` file

```
TELEGRAM_NOTI_GROUP=-123123123
TELEGRAM_BOT_ID=botid

```

```
class TestController extends Controller
{
  public function foo(){
    sqlLog(ActionLog::where('user_id', 1));
  }
}
```

#### Helper

[](#helper)

##### trans()

[](#trans)

This package includes an updated `trans` function, you must have added `vendor/tommyys/laravel_library/src/Helper.php` to `composer.json` to have it working.

Example:

```

  {{trans('string.Stock')}}

```

Output:

```

  Stock

```

##### output()

[](#output)

This function will run `echo` and `Log::info` together.

##### sqlLog()

[](#sqllog)

Accepts model/eloquent object as input. This helper function will form a full sql query including parameters to ease troubleshooting in MYSQL.

Example:

```
$userID = 123;
sqlLog(ActionLog::where('user_id', $userID));
```

Output:

```
select * from `action_log` where `user_id` = "123"
```

##### roundDownDecimal($number, $decimals = 2, $dec\_point = '.', $thousands\_point = ',')

[](#rounddowndecimalnumber-decimals--2-dec_point---thousands_point--)

This helper function works like number\_format. except that it does not round up the decimals.

Example:

```
echo roundDownDecimal(200.1779, 2); #returns 200.17
echo roundDownDecimal(200.175,2); #returns 200.17
echo roundDownDecimal(200.172,2); #returns 200.17
```

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity66

Established project with proven stability

 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 ~13 days

Recently: every ~26 days

Total

40

Last Release

2071d ago

Major Versions

1.4.2 → 6.x-dev2019-10-15

### Community

Maintainers

![](https://www.gravatar.com/avatar/008344f38ee6ce53bb494701c7accc5fe9eb79bbf19e60d22ff68870af15b6ea?d=identicon)[tommyys](/maintainers/tommyys)

---

Top Contributors

[![tommyys](https://avatars.githubusercontent.com/u/20131277?v=4)](https://github.com/tommyys "tommyys (3 commits)")

### Embed Badge

![Health badge](/badges/tommyys-laravel-library/health.svg)

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

###  Alternatives

[flarum/core

Delightfully simple forum software.

211.3M1.9k](/packages/flarum-core)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[symfony/ux-cropperjs

Cropper.js integration for Symfony

19280.3k3](/packages/symfony-ux-cropperjs)[aedart/athenaeum

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

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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