New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

jag/common

Common resources like classes, helpers, traits and more
39 2
Install
composer require jag/common
Latest Version:v1.0.2
PHP:>=5.5.0
Laravel:5
License:MIT
Last Updated:Aug 11, 2015
Links: GitHub  ·  Packagist
Maintainer: jayaregalinada

Jag\Common

Author Packagist Version Software License Laravel PHP

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 for instruction.

Laravel Packager are not included out-of-the-box (updated since 1.0.2). See below for instruction

Table of Contents

Included Packages

Install

Via Composer

$ composer require jag/common

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

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

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

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

protected $middleware = [
    'Clockwork\Support\Laravel\ClockworkMiddleware',
    ...
]
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.

However, an article teaches you to how to create packages.

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

Extend Exception Handler

You can use the Exception handler specially for developing. This includes the Whoops. You can extend your app/Exceptions/Handler.php with Jag\Common\Exceptions\Handler.

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

Please see CHANGELOG for more information what has changed recently.

Security

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

Credits

License

The MIT License (MIT). Please see License File for more information.

Related Packages

spatie/image

Manipulate images with an expressive API

72,272,198 1,366
laravel-at/laravel-image-sanitize

A small but handy package to prevent malicious code execution coming into your a...

87,681 345
lbhurtado/common

This is a utility package for lbhurtado/{missive, sms, tactician, engagespark}.

10,314 0
patrickrose/whoops-configurator

Provides a sensible way to configure Whoops in Laravel

1,998 2
jasis/image-resizer

Image resizer library for laravel

36 0

Version History

Version Released PHP Laravel License
v1.0.2 >=5.5.0 ~5 MIT
v1.0.1 ~5.5 ~5 MIT
v1.0.0 ~5.5 ~5 MIT