# 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/olivia/l_o_v_e_s_p_e_l_l_c_a_s_t_e_r_t_o_h_e_l_p_y_o_u_g_e_t_b_a_c_k_y_o_u_r_e_x/` ## 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": { ... , "Olivia\\LOVESPELLCASTERTOHELPYOUGETBACKYOUREX\\": "packages/olivia/l_o_v_e_s_p_e_l_l_c_a_s_t_e_r_t_o_h_e_l_p_y_o_u_g_e_t_b_a_c_k_y_o_u_r_e_x/src", "Olivia\\LOVESPELLCASTERTOHELPYOUGETBACKYOUREX\\Seeders\\": "packages/olivia/l_o_v_e_s_p_e_l_l_c_a_s_t_e_r_t_o_h_e_l_p_y_o_u_g_e_t_b_a_c_k_y_o_u_r_e_x/database/seeders" ... } }, ... ``` ## Config Add the entries in service provider in `config/app.php` ```php ... 'providers' => [ ... Olivia\LOVESPELLCASTERTOHELPYOUGETBACKYOUREX\Providers\LOVESPELLCASTERTOHELPYOUGETBACKYOUREXServiceProvider::class, ... ], ... 'alias' => [ ... 'LOVESPELLCASTERTOHELPYOUGETBACKYOUREX' => Olivia\LOVESPELLCASTERTOHELPYOUGETBACKYOUREX\Facades\LOVESPELLCASTERTOHELPYOUGETBACKYOUREX::class, ... ] ... ``` ## Migrate After service provider is set run the commapnd to migrate and seed the database. php artisan migrate php artisan db:seed --class=Olivia\\LOVESPELLCASTERTOHELPYOUGETBACKYOUREX\\Seeders\\LOVESPELLCASTERTOHELPYOUGETBACKYOUREXTableSeeder ## Publishing **Publishing configuration** php artisan vendor:publish --provider="Olivia\LOVESPELLCASTERTOHELPYOUGETBACKYOUREX\Providers\LOVESPELLCASTERTOHELPYOUGETBACKYOUREXServiceProvider" --tag="config" **Publishing language** php artisan vendor:publish --provider="Olivia\LOVESPELLCASTERTOHELPYOUGETBACKYOUREX\Providers\LOVESPELLCASTERTOHELPYOUGETBACKYOUREXServiceProvider" --tag="lang" **Publishing views** php artisan vendor:publish --provider="Olivia\LOVESPELLCASTERTOHELPYOUGETBACKYOUREX\Providers\LOVESPELLCASTERTOHELPYOUGETBACKYOUREXServiceProvider" --tag="view" ## URLs and APIs ### Web Urls **Admin** http://path-to-route-folder/admin/l_o_v_e_s_p_e_l_l_c_a_s_t_e_r_t_o_h_e_l_p_y_o_u_g_e_t_b_a_c_k_y_o_u_r_e_x/{modulename} **User** http://path-to-route-folder/user/l_o_v_e_s_p_e_l_l_c_a_s_t_e_r_t_o_h_e_l_p_y_o_u_g_e_t_b_a_c_k_y_o_u_r_e_x/{modulename} **Public** http://path-to-route-folder/l_o_v_e_s_p_e_l_l_c_a_s_t_e_r_t_o_h_e_l_p_y_o_u_g_e_t_b_a_c_k_y_o_u_r_e_x_e_s ### API endpoints **List** http://path-to-route-folder/api/user/l_o_v_e_s_p_e_l_l_c_a_s_t_e_r_t_o_h_e_l_p_y_o_u_g_e_t_b_a_c_k_y_o_u_r_e_x/{modulename} METHOD: GET **Create** http://path-to-route-folder/api/user/l_o_v_e_s_p_e_l_l_c_a_s_t_e_r_t_o_h_e_l_p_y_o_u_g_e_t_b_a_c_k_y_o_u_r_e_x/{modulename} METHOD: POST **Edit** http://path-to-route-folder/api/user/l_o_v_e_s_p_e_l_l_c_a_s_t_e_r_t_o_h_e_l_p_y_o_u_g_e_t_b_a_c_k_y_o_u_r_e_x/{modulename}/{id} METHOD: PUT **Delete** http://path-to-route-folder/api/user/l_o_v_e_s_p_e_l_l_c_a_s_t_e_r_t_o_h_e_l_p_y_o_u_g_e_t_b_a_c_k_y_o_u_r_e_x/{modulename}/{id} METHOD: DELETE **Public List** http://path-to-route-folder/api/l_o_v_e_s_p_e_l_l_c_a_s_t_e_r_t_o_h_e_l_p_y_o_u_g_e_t_b_a_c_k_y_o_u_r_e_x/{modulename} METHOD: GET **Public Single** http://path-to-route-folder/api/l_o_v_e_s_p_e_l_l_c_a_s_t_e_r_t_o_h_e_l_p_y_o_u_g_e_t_b_a_c_k_y_o_u_r_e_x/{modulename}/{slug} METHOD: GET