# Installation The instructions below will help you to properly install the generated package to the lavalite project. ## Location Extract the package contents to the folder `/packages/reinaldo/teste00pkg/` ## Composer Add the below entries in the `composer.json` file's autoload section and run the command `composer dump-autoload` in terminal. ```json ... "autoload": { "psr-4": { ... , "Reinaldo\\Teste00pkg\\": "packages/reinaldo/teste00pkg/src", "Reinaldo\\Teste00pkg\\Seeders\\": "packages/reinaldo/teste00pkg/database/seeders" ... } }, ... ``` ## Config Add the entries in service provider in `config/app.php` ```php ... 'providers' => [ ... Reinaldo\Teste00pkg\Providers\Teste00pkgServiceProvider::class, ... ], ... 'alias' => [ ... 'Teste00pkg' => Reinaldo\Teste00pkg\Facades\Teste00pkg::class, ... ] ... ``` ## Migrate After service provider is set run the commapnd to migrate and seed the database. php artisan migrate php artisan db:seed --class=Reinaldo\\Teste00pkg\\Seeders\\Teste00pkgTableSeeder ## Publishing **Publishing configuration** php artisan vendor:publish --provider="Reinaldo\Teste00pkg\Providers\Teste00pkgServiceProvider" --tag="config" **Publishing language** php artisan vendor:publish --provider="Reinaldo\Teste00pkg\Providers\Teste00pkgServiceProvider" --tag="lang" **Publishing views** php artisan vendor:publish --provider="Reinaldo\Teste00pkg\Providers\Teste00pkgServiceProvider" --tag="view" ## URLs and APIs ### Web Urls **Admin** http://path-to-route-folder/admin/teste00pkg/{modulename} **User** http://path-to-route-folder/user/teste00pkg/{modulename} **Public** http://path-to-route-folder/teste00pkgs ### API endpoints **List** http://path-to-route-folder/api/user/teste00pkg/{modulename} METHOD: GET **Create** http://path-to-route-folder/api/user/teste00pkg/{modulename} METHOD: POST **Edit** http://path-to-route-folder/api/user/teste00pkg/{modulename}/{id} METHOD: PUT **Delete** http://path-to-route-folder/api/user/teste00pkg/{modulename}/{id} METHOD: DELETE **Public List** http://path-to-route-folder/api/teste00pkg/{modulename} METHOD: GET **Public Single** http://path-to-route-folder/api/teste00pkg/{modulename}/{slug} METHOD: GET