# 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/offerte/offerte/` ## Composer Add the below entries in the `composer.json` file's autoload section and run the command `composer dump-autoload` in terminal. ```json ... "autoload": { ... "classmap": [ ... "packages/offerte/offerte/database/seeds", ... ], "psr-4": { ... "Offerte\\Offerte\\": "packages/offerte/offerte/src", ... } }, ... ``` ## Config Add the entries in service provider in `config/app.php` ```php ... 'providers' => [ ... Offerte\Offerte\Providers\OfferteServiceProvider::class, ... ], ... 'alias' => [ ... 'Offerte' => Offerte\Offerte\Facades\Offerte::class, ... ] ... ``` ## Migrate After service provider is set run the commapnd to migrate and seed the database. php artisan migrate php artisan db:seed --class=Offerte\\OfferteTableSeeder ## Publishing **Publishing configuration** php artisan vendor:publish --provider="Offerte\Offerte\Providers\OfferteServiceProvider" --tag="config" **Publishing language** php artisan vendor:publish --provider="Offerte\Offerte\Providers\OfferteServiceProvider" --tag="lang" **Publishing views** php artisan vendor:publish --provider="Offerte\Offerte\Providers\OfferteServiceProvider" --tag="view" ## URLs and APIs ### Web Urls **Admin** http://path-to-route-folder/admin/offerte/{modulename} **User** http://path-to-route-folder/user/offerte/{modulename} **Public** http://path-to-route-folder/offertes ### API endpoints **List** http://path-to-route-folder/api/user/offerte/{modulename} METHOD: GET **Create** http://path-to-route-folder/api/user/offerte/{modulename} METHOD: POST **Edit** http://path-to-route-folder/api/user/offerte/{modulename}/{id} METHOD: PUT **Delete** http://path-to-route-folder/api/user/offerte/{modulename}/{id} METHOD: DELETE **Public List** http://path-to-route-folder/api/offerte/{modulename} METHOD: GET **Public Single** http://path-to-route-folder/api/offerte/{modulename}/{slug} METHOD: GET