Skip to content

Latest commit

 

History

History
92 lines (42 loc) · 2.12 KB

START.HERE.md

File metadata and controls

92 lines (42 loc) · 2.12 KB

Laravel Package Start Toolkit

A simple toolkit to KickStart laravel package development.

Quick Start

  • Open your laravel project folder

  • Create a directory in your project root to store your packages lets just call it packages.

  • Lets add the YourVendorName directory to the pacakge folder we just creates this will help keep things organised by vendor. Your folder sturcture should look something like this packages/YourVendorName/

  • cd in the Vendor folder and clone the github repo

git clone https:/github.com/shawnsandy/PkgStart packagename
  • CD into your new package dir and run $ php prefill.php in the command line. Follow the prompts to replace Shawn Sandy shawnsandy https://github.com/shawnsandy [email protected] shawnsandy deploykit Laravel deploy kit :psr4_namespace with their correct values package files, CHANGELOG.md, CONTRIBUTING.md, LICENSE.md, /src/**.php and composer.json files: Delete the file prefill.php when done.
 php prefill.php
 
  • Add the package to composer.json psr-4 namespace (code below). Note packages is the folder we created to clone our packages into, replace YourVendorName and PackageName with your respectives names you entered in base prompts.
"psr-4": {
    "App\\": "app/",
    "YourVendorName\\PackageName\\": "packages/YourVendorName/PackageName/src",
 },

Dump composer autoload

composer dumpautoload
  • Go to config/app.php and add the package service provider
VendorName\PackageName\ServicesProvider::class,
  • Reset the project
rm -rf .git && git init

git a .

git commit -m "Initialized MyPackageName..."

Build something awesome

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

License

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