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

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

multimedia-street/common
========================

Common usage for Multimedia Street Projects

v0.1.3(9y ago)035MITPHPPHP &gt;=5.5.9|~7.0

Since Apr 21Pushed 9y ago1 watchersCompare

[ Source](https://github.com/multimedia-street/common)[ Packagist](https://packagist.org/packages/multimedia-street/common)[ Docs](https://github.com/multimedia-street/common)[ RSS](/packages/multimedia-street-common/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (16)Versions (6)Used By (0)

Common
======

[](#common)

[![Latest Version on Packagist](https://camo.githubusercontent.com/5d64807b3d46e395fb0cefd9f39b41a2e07be21cd90c220ccb4a05f390822e88/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d756c74696d656469612d7374726565742f636f6d6d6f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/multimedia-street/common)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Laravel](https://camo.githubusercontent.com/0126a91f4bfcde048dd7f91d7f7d6540e5459c049166f8fa7166115c53f271c8/687474703a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d7e352e312d6f72616e67652e7376673f7374796c653d666c61742d737175617265)](link-laravel)[![Total Downloads](https://camo.githubusercontent.com/a5b18dc704a44d093cc64ddd2677eb5cfffd8223c52653d3f188cedef2fd9bde/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d756c74696d656469612d7374726565742f636f6d6d6f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/multimedia-street/common)

Some boilerplate for most of the Multimedia Street projects.

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

[](#table-of-contents)

- [Included Packages](#included-packages)
- [Install](#install)
- [Via Composer](#via-composer)
- [Add Service Provider](#add-service-provider)
- [Add Package Facades](#add-package-facades)
- [Disabling CSRF protection for your API](#disabling-csrf-protection-for-your-api)
- [Post Install](#post-install)
- [Publish Packages Configurations](#publish-packages-configurations)
- [Extend Exception Handler](#extend-exception-handler)
- [Response Trait](#response-trait)
- [Change Log](#change-log)
- [Testing](#testing)
- [Contributing](#contributing)
- [Security](#security)
- [Credits](#credits)
- [License](#license)

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

[](#included-packages)

- [Image](https://github.com/Intervention/image) - PHP Image Manipulation
- [Image (Cache)](https://github.com/Intervention/imagecache) - Caching extension for the Intervention Image Class
- [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
- [DOMPDF](https://github.com/barryvdh/laravel-dompdf) - DOMPDF Wrapper for Laravel 5
- [Excel](https://github.com/Maatwebsite/Laravel-Excel) - Laravel Excel v2.1.\* for Laravel 5
- [CORS](https://github.com/barryvdh/laravel-cors) - CORS in Laravel 5

Install
-------

[](#install)

#### Via Composer

[](#via-composer)

Require the `multimedia-street/common` package in your composer.json and update your dependencies.

```
$ composer require multimedia-street/common
```

#### Add Service Provider

[](#add-service-provider)

Include the Service Provider to your `config/app.php` in providers array

```
Mmstreet\Common\ServiceProvider::class,
```

#### Add Package Facades

[](#add-package-facades)

Include Facades to your `config/app.php` in aliases array

```
'Excel' => Maatwebsite\Excel\Facades\Excel::class,
'PDF' => Barryvdh\DomPDF\Facade::class,
'Image' => Intervention\Image\Facades\Image::class,
```

#### Disabling CSRF protection for your API

[](#disabling-csrf-protection-for-your-api)

To use the CORS properly, [as stated in the documentation](https://github.com/barryvdh/laravel-cors#disabling-csrf-protection-for-your-api), in `App\Http\Middleware\VerifyCsrfToken`, add your routes to the exceptions:

```
protected $except = [
  'api/*'
];
```

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

[](#post-install)

#### Publish Packages Configurations

[](#publish-packages-configurations)

After the installation is completed, publish the vendor publish by running:

```
php artisan vendor:publish
```

#### 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 `Mmstreet\Common\Exceptions\Handler`. Also add your uris using the `$corsUris` property to be used in [CORS](https://github.com/barryvdh/laravel-cors). See example below.

```
namespace App\Exceptions;

use Mmstreet\Common\Exceptions\Handler as ExceptionHandler;

class Handler extends ExceptionHandler
{
    protected $corsUris = [
        'api/*', // default
        'auth/*',
        'logout'
    ];
}
```

#### Response Trait

[](#response-trait)

You can use the `Mmstreet\Common\Traits\ResponseTrait` to your `App\Http\Controllers\Controller` for easy returning response either Json or in View. See example below.

```
namespace App\Http\Controllers;

use Illuminate\Foundation\Bus\DispatchesJobs;
use Illuminate\Routing\Controller as BaseController;
use Illuminate\Foundation\Validation\ValidatesRequests;
use Illuminate\Foundation\Auth\Access\AuthorizesRequests;
use Mmstreet\Common\Traits\ResponseTrait;

abstract class Controller extends BaseController
{
    use AuthorizesRequests, DispatchesJobs, ValidatesRequests, ResponseTrait;
}
```

Example usage:

```
namespace App\Http\Controllers;

use App\Post;

class PostController extends Controller
{
    public function index()
    {
        $posts = Post::all();

        if ($posts->isEmpty()) {
            // {The message}, {The data}, {status code}, {view name}, {response headers}, {Json callback}
            return $this->errorResponse('No Posts as of the moment', $posts, 404, 404, [], 'callback');
        }

        return $this->successResponse('Successfully get all posts', $posts);
    }

    public function all()
    {
        $posts = Post::all();

        if ($post->isEmpty()) {
            // You can also use Closure.
            return $this->errorResponse(function() {
                return response('No POSTS');
            }
        }

        return $this->successResponse('Successfully get all posts', $posts);
    }
}
```

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) and [CONDUCT](CONDUCT.md) for details.

Security
--------

[](#security)

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

Credits
-------

[](#credits)

- [Jay Are Galinada](https://github.com/jayaregalinada)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

Total

4

Last Release

3628d ago

### 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 (25 commits)")

---

Tags

commonmultimedia-street

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[bagisto/bagisto

Bagisto Laravel E-Commerce

26.2k161.6k7](/packages/bagisto-bagisto)[unopim/unopim

UnoPim Laravel PIM

9.4k1.8k](/packages/unopim-unopim)[flarum/core

Delightfully simple forum software.

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

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

245.2k](/packages/aedart-athenaeum)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1225.0k10](/packages/fleetbase-core-api)

PHPackages © 2026

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