# Installation The instructions below will help you to properly installand run the generated package to the lavalite project. ## Location Extract the package contents to the folder `/packages/b2buy/email/` ## Composer Add the below entries in the `composer.json`. ```json ... "repositories": { ... { "type": "path", "url": "packages/b2buy/email" } ... }, ... ``` Then run `composer require b2buy/email` ## Migration and seeds ``` php artisan migrate php artisan db:seed --class=B2buy\\Email\\Seeders\\EmailTableSeeder ``` ## Publishing * Configuration ``` php artisan vendor:publish --provider="B2buy\Email\Providers\EmailServiceProvider" --tag="config" ``` * Language ``` php artisan vendor:publish --provider="B2buy\Email\Providers\EmailServiceProvider" --tag="lang" ``` * Views ``` php artisan vendor:publish --provider="B2buy\Email\Providers\EmailServiceProvider" --tag="view" ``` ## URLs and APIs ### Web Urls * Admin ``` http://path-to-route-folder/admin/email/{modulename} ``` * User ``` http://path-to-route-folder/user/email/{modulename} ``` * Public ``` http://path-to-route-folder/emails ``` ### API endpoints These endpoints can be used with or without `/api/` And also the user can be varied depend on the type of users, eg user, client, admin etc. #### Resource * List ``` http://path-to-route-folder/api/user/email/{modulename} METHOD: GET ``` * Create ``` http://path-to-route-folder/api/user/email/{modulename} METHOD: POST ``` * Edit ``` http://path-to-route-folder/api/user/email/{modulename}/{id} METHOD: PUT ``` * Delete ``` http://path-to-route-folder/api/user/email/{modulename}/{id} METHOD: DELETE ``` #### Public * List ``` http://path-to-route-folder/api/email/{modulename} METHOD: GET ``` * Single Item ``` http://path-to-route-folder/api/email/{modulename}/{slug} METHOD: GET ``` #### Others * Report ``` http://path-to-route-folder/api/user/email/{modulename}/report/{report} METHOD: GET ``` * Export/Import ``` http://path-to-route-folder/api/user/email/{modulename}/exim/{exim} METHOD: POST ``` * Action ``` http://path-to-route-folder/api/user/email/{modulename}/action/{id}/{action} METHOD: PATCH ``` * Actions ``` http://path-to-route-folder/api/user/email/{modulename}/actions/{action} METHOD: PATCH ``` * Workflow ``` http://path-to-route-folder/api/user/email/{modulename}/workflow/{id}/{transition} METHOD: PATCH ```