library larapackboiler
Laravel 5.1+ package development boilerplate.
neelkanthk/larapackboiler
Laravel 5.1+ package development boilerplate.
- Sunday, May 15, 2016
- by Neelkanth Kaushik
- Repository
- 3 Watchers
- 6 Stars
- 7 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 1 Forks
- 0 Open issues
- 2 Versions
- 0 % Grown
Laravel Package Boilerplate
Version 1.0.0
A package development boilerplate for Laravel 5.1+
Provides a Jump Start to your Laravel package development in a structured way.
Salient Features
- Follows Laravel 5.1 directory structure.
- Well documented with example code.
- Encourages use of Interfaces and Database Repositories.
- Saves a lot of time while developing a new package from scratch.
- Make your package views customizable in the application.
- Provides example code for controller, model, view, interfaces, events, repositories.
- Helps in learning Package Development.
Installation
Note: You need to have composer installed on your system., (*1)
-
Download this package to your vendor folder., (*2)
composer require neelkanthk/larapackboiler "dev-master"
-
Copy the following to your config/app.php's providers array, (*3)
- Package\Application\Providers\PackageServiceProvider::class
- Package\Application\Providers\PackageEventServiceProvider::class
-
Change the larapackboiler composer.json file to define dependencies and other package related information., (*4)
-
Add the following line to the project's composer.json psr-4 array:, (*5)
"psr-4": {
"App\\": "app/",
"Package\\Application\\" : "vendor/neelkanthk/larapackboiler/application/src/"
}
-
Run composer dumpautoload
or composer dump-autoload
from your project root., (*6)
-
Run following command to move the package assets, views, config files to your application folder. (Optional), (*7)
php artisan vendor:publish
-
Test your installation by visiting the following URL in your browser., (*8)
packagename/test, (*9)
-
If you see 'Hi I am PackageController@exampleAction', then you have successfully configured the laraPackBoiler., (*10)
-
That's it. Now, You are ready to develop your package., (*11)
The boilerplate code is well documented to help you in your development.
Quick Start for developing your first package using boilerplate
- Rename the package folder to your package name.
-
Change the package name in project's composer.json psr-4 array., (*12)
Example:, (*13)
"psr-4": {
"App\\": "app/",
"TodoPackage\\Application\\" : "vendor/{path_to_package}/application/src/"
}
- Similarly, Change the package name in your config/app.php's providers array.
- TodoPackage\Application\Providers\TodoPackageServiceProvider::class
- TodoPackage\Application\Providers\TodoPackageEventServiceProvider::class
-
Change the package's composer.json psr-4 array:, (*14)
"psr-4": {
"todopackage\\application\\": "src/"
}
-
Run composer dump-autoload
from your project root., (*15)
-
Done. Start adding new controllers, models, routes, views to your new package., (*16)
1.0.x-dev
1.0.9999999.9999999-dev
Laravel 5.1+ package development boilerplate.
Sources
Download
GPL
The Requires
The Development Requires
by
Neelkanth Kaushik
dev-master
9999999-dev
Laravel 5.1+ package development boilerplate.
Sources
Download
GPL
The Requires
The Development Requires
by
Neelkanth Kaushik