Download the PHP package maize-tech/laravel-legal-consent without Composer

On this page you can find all versions of the php package maize-tech/laravel-legal-consent. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-legal-consent

# Laravel Legal Consent [![Latest Version on Packagist](https://img.shields.io/packagist/v/maize-tech/laravel-legal-consent.svg?style=flat-square)](https://packagist.org/packages/maize-tech/laravel-legal-consent) [![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/maize-tech/laravel-legal-consent/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/maize-tech/laravel-legal-consent/actions?query=workflow%3Arun-tests+branch%3Amain) [![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/maize-tech/laravel-legal-consent/php-cs-fixer.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/maize-tech/laravel-legal-consent/actions?query=workflow%3A"Check+%26+fix+styling"+branch%3Amain) [![Total Downloads](https://img.shields.io/packagist/dt/maize-tech/laravel-legal-consent.svg?style=flat-square)](https://packagist.org/packages/maize-tech/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 are then ordered by their published_at date in order to pick the latest one published. The response contains the document id (used for the POST route) along with all its information useful for rendering. Here is a sample response body: #### POST - **/legal/documents/{id}** This endpoint stores the consent for the given document from the currently authenticated user. ### Legal Document Listener You can eventually accept all active legal documents using our listener. This can be useful, for example, when your application handles the registration of users, and they must accept all legal documents through a checkbox before proceeding. In this case, all you should do is add the listener to the `Registered` event in `EventServiceProvider`: ## Testing ## Changelog Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently. ## Contributing Please see [CONTRIBUTING](https://github.com/maize-tech/.github/blob/main/CONTRIBUTING.md) for details. ## Security Vulnerabilities Please review [our security policy](https://github.com/maize-tech/.github/security/policy) on how to report security vulnerabilities. ## Credits - [Enrico De Lazzari](https://github.com/enricodelazzari) - [All Contributors](../../contributors) ## License The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

All versions of laravel-legal-consent with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
ext-json Version *
illuminate/database Version ^9.0|^10.0|^11.0
illuminate/http Version ^9.0|^10.0|^11.0
illuminate/routing Version ^9.0|^10.0|^11.0
illuminate/support Version ^9.0|^10.0|^11.0
spatie/laravel-package-tools Version ^1.14.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package maize-tech/laravel-legal-consent contains the following files

Loading the files please wait ....