Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/neelkanthk/larapackboiler
A Laravel 5.1 + package development boilerplate.
https://github.com/neelkanthk/larapackboiler
Last synced: 10 days ago
JSON representation
A Laravel 5.1 + package development boilerplate.
- Host: GitHub
- URL: https://github.com/neelkanthk/larapackboiler
- Owner: neelkanthk
- License: gpl-3.0
- Created: 2016-03-23T20:56:45.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-09-08T21:34:06.000Z (about 2 months ago)
- Last Synced: 2024-10-12T11:12:09.552Z (26 days ago)
- Language: PHP
- Size: 103 KB
- Stars: 6
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Laravel Package Boilerplate
#####Version 1.0.0
##A package development boilerplate for Laravel 5.1+####Download for a demo package built using LaraPackBoiler.
#####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.
```
composer require neelkanthk/larapackboiler "dev-master"
```2. Copy the following to your config/app.php's providers array
- Package\Application\Providers\PackageServiceProvider::class
- Package\Application\Providers\PackageEventServiceProvider::class3. 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:
```
"psr-4": {
"App\\": "app/",
"Package\\Application\\" : "vendor/neelkanthk/larapackboiler/application/src/"
}
```5. 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)
```
php artisan vendor:publish
```7. Test your installation by visiting the following URL in your browser.
packagename/test
8. If you see 'Hi I am PackageController@exampleAction', then you have successfully configured the laraPackBoiler.7. That's it. Now, You are ready to develop your package.
#####The boilerplate code is well documented to help you in your development.
##Quick Start for developing your first package using boilerplate
1. Rename the package folder to your package name.
2. Change the package name in project's composer.json psr-4 array.
Example:```
"psr-4": {
"App\\": "app/",
"TodoPackage\\Application\\" : "vendor/{path_to_package}/application/src/"
}
```
3. Similarly, Change the package name in your config/app.php's providers array.- TodoPackage\Application\Providers\TodoPackageServiceProvider::class
- TodoPackage\Application\Providers\TodoPackageEventServiceProvider::class4. Change the package's composer.json psr-4 array:
```
"psr-4": {
"todopackage\\application\\": "src/"
}
```5. Run ``` composer dump-autoload ``` from your project root.
6. Done. Start adding new controllers, models, routes, views to your new package.