PHPackages                             jag/common - 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. [Image &amp; Media](/categories/media)
4. /
5. jag/common

ActiveLibrary[Image &amp; Media](/categories/media)

jag/common
==========

Common resources like classes, helpers, traits and more

v1.0.2(10y ago)239MITPHPPHP &gt;=5.5.0

Since Aug 5Pushed 10y ago1 watchersCompare

[ Source](https://github.com/jayaregalinada/common)[ Packagist](https://packagist.org/packages/jag/common)[ Docs](https://github.com/jayaregalinada/common.git)[ RSS](/packages/jag-common/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (15)Versions (4)Used By (0)

Jag\\Common
===========

[](#jagcommon)

[![Author](https://camo.githubusercontent.com/4f8d0836b06eebd79d4470fee2b686f49fbd11a9b41fe79f0eadd88b5104efb8/687474703a2f2f696d672e736869656c64732e696f2f62616467652f617574686f722d406a617961726567616c696e6164612d626c75652e7376673f7374796c653d666c61742d737175617265)](https://github.com/jayaregalinada)[![Packagist Version](https://camo.githubusercontent.com/e87094f6b1a4e697f37aa2e801f6acedde11b7cd6a0aee6188b9d72846823ab6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a61672f636f6d6d6f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jag/common)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Laravel](https://camo.githubusercontent.com/2cb714daad0c187a6ff1bcd7b180ba26477ba9c858578cdbbabcaaea0f423b71/687474703a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d7e352d6f72616e67652e7376673f7374796c653d666c61742d737175617265)](http://laravel.com)[![PHP](https://camo.githubusercontent.com/722a3e1d7150d4c3baeda23dd060c9067e4a753fb7441ce5006a09b2b31fb669/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d7e352e352d626c75652e7376673f7374796c653d666c61742d737175617265)](http://php.net)

Nah, some boilerplate here. All included packages service provider are already registered.

Option service are not included out-of-the-box, instead add its service provider. See [below](#option-service-provider) for instruction.

[Laravel Packager](https://github.com/Jeroen-G/laravel-packager) are not included out-of-the-box (updated since 1.0.2). See [below](#how-to-use-laravel-packager) for instruction

Table of Contents
-----------------

[](#table-of-contents)

- [Included Packages](#included-packages)
- [Install](#install)
- [Post Install](#post-install)
- [IDE Helper](#ide-helper)
- [Option Service Provider](#option-service-provider)
- [Clockwork Middleware](#clockwork-middleware)
- [How to use Laravel Packager](#how-to-use-laravel-packager)
- [Optional Facade](#optional-facade)
- [Extend Exception Handler](#extend-exception-handler)
- [JSON Controller Response Trait](#json-controller-response-trait)
- [Change Log](#change-log)
- [Security](#security)
- [Credits](#credits)
- [License](#license)

Included Packages
-----------------

[](#included-packages)

- [Socialite](https://github.com/laravel/socialite) - Fluent interface to OAuth authentication
- [Image](https://github.com/Intervention/image) - PHP Image Manipulation
- [Image(Cache)](https://github.com/Intervention/imagecache) - Caching extension for the Intervention Image Class
- [Html/Form](https://github.com/illuminate/html) - Illuminate HTML component
- [Entrust](https://github.com/Zizaco/entrust) - Role-based Permissions
- [HTML Sanitizer](mailto:zefredz@gmail.com)- HTML Sanitizer
- [iSeed](https://github.com/orangehill/iseed) - Inverse seed generator
- [Whoops](https://github.com/filp/whoops) - PHP errors for cool kids
- [Clockwork](https://github.com/itsgoingd/clockwork) - Chrome extension for PHP development

Install
-------

[](#install)

Via Composer

```
$ composer require jag/common
```

Post Install
------------

[](#post-install)

After the installation/update completed, add the service provider to the `$provider` array in `config/app.app`

```
'Jag\Common\CommonServiceProvider'

```

After that, run

```
$ php artisan vendor:publish
```

Configurations from `clockwork`, `ide-helper`, `image`, `imagecache`, and `entrust` generated. Also, `users` migration will be generated.

##### IDE Helper

[](#ide-helper)

After installing/updating composer, you can now re-generate the docs yourself

```
$ php artisan ide-helper:generate
```

You can read the full documentation of [this package](https://github.com/barryvdh/laravel-ide-helper)

##### Option Service Provider

[](#option-service-provider)

If you want to include the Option Service, add the service provider to the `$provider` array in `config/app.app`

```
'Jag\Common\OptionServiceProvider'

```

After that, publish the migrations.

```
$ php artisan vendor:publish --provider="Jag\Common\OptionServiceProvider"
```

##### Clockwork Middleware

[](#clockwork-middleware)

You need to add Clockwork middleware, in your `app/Http/Kernel.php`

```
protected $middleware = [
    'Clockwork\Support\Laravel\ClockworkMiddleware',
    ...
]
```

##### How to use Laravel Packager

[](#how-to-use-laravel-packager)

**NOTE: This is for developing Laravel packages but only works for Laravel `~5.1`.**

If you are using Laravel `~5.1` add the service provider in `config/app.php`

```
'JeroenG\Packager\PackagerServiceProvider',

```

This package provides you with a simple tool to set up a new packages. Nothing more, nothing less. Read more of its documentation [here](https://github.com/Jeroen-G/laravel-packager).

However, an [article](https://medium.com/@tabacitu/creating-laravel-5-packages-for-dummies-ec6a4ded2e93) teaches you to how to create packages.

Optional Facade
---------------

[](#optional-facade)

Edit and Add your `config/app.php` at `$aliases` array

```
'aliases' => [
    ...
    'Socialite' => 'Laravel\Socialite\Facades\Socialite',
    'Image'     => 'Intervention\Image\Facades\Image',
    'Html'      => 'Illuminate\Html\HtmlFacade',
    'Form'      => 'Illuminate\Html\FormFacade',
    'Entrust'   => 'Zizaco\Entrust\EntrustFacade',
],
```

You can also use the class name resolution via [`::class`](http://php.net/manual/en/language.oop5.basic.php#language.oop5.basic.class.class)

Extend Exception Handler
------------------------

[](#extend-exception-handler)

You can use the Exception handler specially for developing. This includes the [Whoops](https://github.com/filp/whoops). You can extend your `app/Exceptions/Handler.php` with `Jag\Common\Exceptions\Handler`.

JSON Controller Response Trait
------------------------------

[](#json-controller-response-trait)

For easy JSON response on your Controller, just included the trait `Jag\Common\Traits\ControllerResponsesTrait` to your `app/Http/Controllers/Controller.php`.

Change Log
----------

[](#change-log)

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

Security
--------

[](#security)

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

Credits
-------

[](#credits)

- [Jay Are Galinada](https://github.com/jayaregalinada)
- [Frederic Minne](zefredz@gmail.com)

License
-------

[](#license)

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

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

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

Total

3

Last Release

3934d ago

PHP version history (2 changes)v1.0.0PHP ~5.5

v1.0.2PHP &gt;=5.5.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/ccb2da23632346595380271ccb477d6f054912dde484fb463818d2d5b5b0ae19?d=identicon)[jayaregalinada](/maintainers/jayaregalinada)

---

Top Contributors

[![jayaregalinada](https://avatars.githubusercontent.com/u/1170288?v=4)](https://github.com/jayaregalinada "jayaregalinada (31 commits)")

---

Tags

laraveloptionsimagewhoopscommonsocialiteentrustimagecachejayaregalinadajagiseedxkyelaravel-packagerlaravel-ide-helperj46

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jag-common/health.svg)

```
[![Health](https://phpackages.com/badges/jag-common/health.svg)](https://phpackages.com/packages/jag-common)
```

###  Alternatives

[intervention/image-laravel

Laravel Integration of Intervention Image

1536.5M102](/packages/intervention-image-laravel)[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)[bkwld/croppa

Image thumbnail creation through specially formatted URLs for Laravel

510496.0k23](/packages/bkwld-croppa)[dragon-code/laravel-http-logger

Logging incoming HTTP requests

319.8k3](/packages/dragon-code-laravel-http-logger)[truckersmp/steam-socialite

Laravel Socialite provider for Steam OpenID.

1516.7k](/packages/truckersmp-steam-socialite)

PHPackages © 2026

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