Skip to content
This repository has been archived by the owner on Oct 23, 2019. It is now read-only.

Softlabs/softlabs-laravel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Softlabs Packages

Softlabs Packages

Installation

Step 1

Add the following attribute to the composer.json file. This will allow the package to be discovered (as it is private)

"repositories": [
	{ "type": "vcs", "url": "http://github.com/softlabs/softlabs-laravel" }
],

Step 2

Add "softlabs/packages": "*" to the require attribute of composer.json (This will be reflected when the composer update command has been run).

Step 3

Add a service provider for each of the sub-packages you wish to use in the application to the app/config/app.php file like so: 'Softlabs\Currency\CurrencyServiceProvider'

Currently available service providers:

'Softlabs\Currency\CurrencyServiceProvider',
'Softlabs\Date\DateServiceProvider',
'Softlabs\Util\UtilServiceProvider',
'Softlabs\Pagination\PaginationServiceProvider',

Step 4

Add an alias for each of the service providers you added in Step 2 and prefix them with SL like so: 'SLCurrency' => 'Softlabs\Facades\SLCurrency'.

Currently available aliases:

'SLCurrency' => 'Softlabs\Facades\SLCurrency',
'SLDate' => 'Softlabs\Facades\SLDate',
'SLUtil' => 'Softlabs\Facades\SLUtil',
'SLPaginator' => 'Softlabs\Facades\SLPaginator',

You can now use the packages!


Updating Packages

If you are updating the package - be it refactoring, fixing bugs or implementing new features, make sure you follow the Softlabs Coding Standards. Commit messages should reflect the sub-package being updated eg.

  Updated 'Logic' class on `Base` package

TODO

  • Each sub-package need an informative README.md which outlines all methods in the sub-package with usage examples and clear descriptions
  • Unit testing needs written for each package
  • Once these have been completed, the package can have its first release made.