PHPackages                             ptuchik/core-utilities - 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. [File &amp; Storage](/categories/file-storage)
4. /
5. ptuchik/core-utilities

ActiveLibrary[File &amp; Storage](/categories/file-storage)

ptuchik/core-utilities
======================

Core utilities for Laravel to extend some functionality and prepare project for other related packages

1.0.42(2y ago)319.4k41MITPHP

Since Feb 13Pushed 2y agoCompare

[ Source](https://github.com/ptuchik/core-utilities)[ Packagist](https://packagist.org/packages/ptuchik/core-utilities)[ RSS](/packages/ptuchik-core-utilities/feed)WikiDiscussions master Synced 4d ago

READMEChangelogDependencies (3)Versions (45)Used By (1)

Core Utilities
==============

[](#core-utilities)

This package includes some useful utilities for Laravel 5.5+ to extend some functionality and prepare project for other related packages

---

Currently included:
-------------------

[](#currently-included)

- `class AbstractTypes` - Extend this class and add your constants to use them later easily.

### Usage

[](#usage)

```
class Gender extends AbstractTypes {
    const MALE = 1;
    const FEMALE = 2;
}
```

```
    print_r(Gender::MALE); // Output: 1
    print_r(Gender::FEMALE); // Output: 2
    print_r(Gender::all()); // Output: '1,2'
    print_r(Gender::all('json')); // Output: '{"1":"translated.male","2":"translated.female"}'
    // You can also pass second parameter false, to not translate the values
    print_r(Gender::all('json', false)); // Output: '{"1":"MALE","2":"FEMALE"}'
    print_r(Gender::all('array')); // Output: ["MALE" => 1, "FEMALE" => 2]
```

---

- `class AppEngineCron` - Just a middleware to filter and allow only requests from Google AppEngine's CRON

### Usage

[](#usage-1)

Just add to routes you need to filter

---

- `class ForceSSL` - Middleware to convert HTTP reuests to HTTPS if set in configuration

### Usage

[](#usage-2)

Edit `protocol` parameter in configuration file and add to routes you need to convert

---

- `class Handler` - Exception to RESTful error messages converter

### Usage

[](#usage-3)

Extend your `App/Exceptions/Handler` from this class, and you will get all exceptions prettified for RESTful API

---

- `class Model` - This class extends from native Eloquent Model and adds some useful features like camelCase attributes, translatable attributes and optional and configurable attribute sanitization

### Usage

[](#usage-4)

Extend all your model's from this one instead of native `Illuminate\Database\Eloquent\Model` and you will get them all automatically

---

- `trait HasParams` - You can use this trait in all your models which have `params` attribute in database

**DO NOT FORGET** to cast your `params` attribute as `array` before using this trait

---

- `trait HasIcon` - You can use this trait in all your models which have icon. This will add `$model->saveIcon($image);` and `$model->deleteIcon();` methods.

**DO NOT FORGET** to add `icon` column to your model's table before using this trait

---

- `class Storage` - You can use it as a factory for your storage

### Usage

[](#usage-5)

```
use Ptuchik\CoreUtilities\Helpers\Storage;

$storage = new Storage(); // Pass true as the only parameter if you need to initialize your public storage

// ... after initialization you can use $storage variable as regular Filesystem Adapter. like:

$storage->get($path);
$storage->put($path);

// ...etc...
```

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity76

Established project with proven stability

 Bus Factor1

Top contributor holds 97.5% 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 ~53 days

Total

43

Last Release

771d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/97d8960403b7a3aee623f5b5ea9964219b6d23abc8a5c6b893a0832ddcf2d70f?d=identicon)[ptuchik](/maintainers/ptuchik)

---

Top Contributors

[![ptuchik](https://avatars.githubusercontent.com/u/4479697?v=4)](https://github.com/ptuchik "ptuchik (115 commits)")[![amirhosseindz](https://avatars.githubusercontent.com/u/8266844?v=4)](https://github.com/amirhosseindz "amirhosseindz (2 commits)")[![Hovakimyannn](https://avatars.githubusercontent.com/u/79104618?v=4)](https://github.com/Hovakimyannn "Hovakimyannn (1 commits)")

---

Tags

laravelgooglecorestoragetranslatableptuchikutilites

### Embed Badge

![Health badge](/badges/ptuchik-core-utilities/health.svg)

```
[![Health](https://phpackages.com/badges/ptuchik-core-utilities/health.svg)](https://phpackages.com/packages/ptuchik-core-utilities)
```

###  Alternatives

[unisharp/laravel-filemanager

A file upload/editor intended for use with Laravel 5 to 10 and CKEditor / TinyMCE

2.2k3.3M74](/packages/unisharp-laravel-filemanager)[zing/laravel-flysystem-obs

Flysystem Adapter for OBS

1211.2k](/packages/zing-laravel-flysystem-obs)[vormkracht10/flysystem-uploadcare

Flysystem driver for Uploadcare for Laravel.

1834.2k](/packages/vormkracht10-flysystem-uploadcare)

PHPackages © 2026

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