This is my first laravel package for Laravel v5.x
Add repositories to composer.json
"repositories": [
{
"type": "vcs",
"url": "https://github.com/onecentlin/laravel-first-package.git"
}
],
Then place require new package for your laravel installation via composer.json
"require": {
"onecentlin/laravel-first-package": "dev-master"
}
Then do composer update
Add following lines to config/app.php
ServiceProvider array
'Onecentlin\FirstPackage\FirstPackageServiceProvider'
Alias array
'FirstPackage' => 'Onecentlin\FirstPackage\FirstPackage'
sayHello returns string message
FirstPackage::sayHello('Winnie', 'happy day!');