Laravel5.2. * expansion package development (1)
# The following tools are required: 'laravel 5. 2. * '-PHP> = 5.6-'lnpm' environment-'phpstorm '# Use the following skills-'Composer' simple use-'Git' simple use-'php' principle of 'autoload' # need to have an account on the following website-[github] (https://github.com /) -[packagist] (https://packagist.org) # directory structure creation create a new 'packages 'directory in the project root directory we use [jeroen-g/laravel-packager] (https://github.com/jeroen-g/laravel-packager) to 'package' initialization "bash $ composer require jeroen-g/laravel-packager -- dev", add the following code to 'config/app. php "'phpjeroeng \ Packager \ PackagerServiceProvider: class," run the following command to initialize 'vendorname' and 'packagename'. you need to customize "bash $ php artisan packager: new VendorName PackageName "after successful execution, the generated 'serviceprovider' is automatically added to 'config/app. php' when you access the website again, the system will prompt that 'packagenameserviceprovider' cannot be found because the files in 'packages 'are not automatically loaded and the 'composer. json, in 'autoload. under psr-4, add the following 'kv "" 'vendorname \ PackageName \ ":" packages/VendorName/PackageName/src "," and then execute the following command, update the 'autoload' file "bash $ comopser dump-autoload". no error will be reported when you access the file again. The environment has been set up in this step.