Laravel5.2. * expansion package development (1)

Source: Internet
Author: User
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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.