{"repo":"maize-tech/laravel-legal-consent","free":true,"listed":false,"github":"https://github.com/maize-tech/laravel-legal-consent","clone":"git clone https://github.com/maize-tech/laravel-legal-consent.git","description":"Easily integrate legal documents to your application","language":"PHP","stars":52,"topics":["laravel","php","legal","tos","privacy","terms-of-service"],"license":"MIT","category":"auth-billing-email","readme_excerpt":"Laravel Legal Consent Easily integrate legal documents (like privacy policies, terms of use, etc.) 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 content of the published config file: Usage Basic To use the package, add the Maize\\LegalConsent\\HasLegalConsent trait to the all Authenticatable models you want to handle. Here's an example including the HasLegalConsent trait to both User and Admin models: Once done, you must define the list of allowed document types by adding them in the allowed document types list from config/legal-consent.php . You can then create one or multiple documents from the DB or, if you wish, you could handle the creation with a CMS. Here are the fields who should be filled: - type : the document type name - body : the content of the document - noted : additional notes to show for the document - published at : the date of publication for the given document Let's say we create a privacy policy document with the publication on 2021-01-01: here's the model entity we would have: You can now call the custom API to retrieve and accept the current document, which can be customized in config/legal-consent.php : GET - /legal/documents/privacy-policy This endpoint retrieves the current legal document using the given criteria: - the document type must be privacy-policy - the published at date must be earlier than now() The document entries ar","default_branch":null,"files":null,"tree":[],"storefront":"/r/maize-tech","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/maize-tech/laravel-legal-consent/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."}