{"repo":"maize-tech/laravel-nps","free":true,"listed":false,"github":"https://github.com/maize-tech/laravel-nps","clone":"git clone https://github.com/maize-tech/laravel-nps.git","description":"Easily integrate custom-made NPS (Net Promoter Score) into your application","language":"PHP","stars":56,"topics":["laravel","api","php","nps","netpromoterscore"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"Laravel NPS Easily integrate custom-made NPS (Net Promoter Score) to your application. Installation You can install the package via composer: You can publish and run the migrations with: You can publish the config file with: This is the contents of the published config file: Usage Basic To use the package, add the Maize\\Nps\\CanAnswerNps trait to the User model. Here's an example model including the CanAnswerNps trait: You can then create one or multiple NPS from the DB or, if you wish, you could handle the creation with a CMS. Here are the fields who should be filled: - question : the question that identifies the NPS - starts at : the start date of the NPS - ends at : the end date of the NPS - range : the value ranges accepted for the given NPS. This value must be equal to one of the keys defined in the range list from config/nps.php . Defaults to default . - visibility : the visibility for the given NPS. This value must be equal to one of the keys defined in the visibility list from config/nps.php . Defaults to default . Let's say we create a NPS which starts on 2021-01-01 and ends after a week: here's the model entity we would have: You can now call the custom API to retrieve, reply or delay the current NPS, which can be customized in config/nps.php : GET - /nps This endpoint retrieves the current NPS using the given criteria: - the starts at date must be earlier than now() - the ends at date must be older than now() - the NPS must be visible (defaults to true ) The NPS ent","default_branch":null,"files":null,"tree":[],"storefront":"/r/maize-tech","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/maize-tech/laravel-nps/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}