2017 © Pedro Peláez
 

library common

Common resources like classes, helpers, traits and more

image

jag/common

Common resources like classes, helpers, traits and more

  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Jag\Common

Author Packagist Version Software License Laravel PHP, (*1)

Nah, some boilerplate here. All included packages service provider are already registered., (*2)

Option service are not included out-of-the-box, instead add its service provider. See below for instruction., (*3)

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

Table of Contents

Included Packages

Install

Via Composer, (*5)

``` bash $ composer require jag/common, (*6)


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

'Jag\Common\CommonServiceProvider', (*7)


After that, run ``` bash $ php artisan vendor:publish

Configurations from clockwork, ide-helper, image, imagecache, and entrust generated. Also, users migration will be generated., (*8)

IDE Helper

After installing/updating composer, you can now re-generate the docs yourself, (*9)

``` bash $ php artisan ide-helper:generate, (*10)


You can read the full documentation of [this package](https://github.com/barryvdh/laravel-ide-helper) ##### 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', (*11)


After that, publish the migrations. ``` bash $ php artisan vendor:publish --provider="Jag\Common\OptionServiceProvider"
Clockwork Middleware

You need to add Clockwork middleware, in your app/Http/Kernel.php, (*12)

``` php protected $middleware = [ 'Clockwork\Support\Laravel\ClockworkMiddleware', ... ], (*13)


##### 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',, (*14)


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 Edit and Add your `config/app.php` at `$aliases` array ``` php '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, (*15)

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., (*16)

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., (*17)

Change Log

Please see CHANGELOG for more information what has changed recently., (*18)

Security

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

Credits

License

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

The Versions