Giter VIP home page Giter VIP logo

laravel-antispam's Introduction

laravel-antispam

How to use:

  1. composer require cleantalk/laravel-antispam
  2. Register the cleantalk_antispam middleware into your Kernel.php
  3. Add CLEANTALK_ENABLED and CLEANTALK_API_KEY to your .env or publish the config file
  4. Include JS into your root blade template (into head block) @include('cleantalk::cleantalk')
  5. Add the middleware to your routes which requires the anti-spam protection (usually form hanled route)

Details:

  1. Open the terminal in the root of your laravel application and run command to require anti-spam module: composer require cleantalk/laravel-antispam
  2. Edit config/app.php file, add new service provider to the providers array: cleantalk\antispam\CleantalkServiceProvider::class Adding service provider
  3. Edit app/Http/Kernel.php file, add new middleware to the $routeMiddleware array: 'cleantalk_antispam' => \cleantalk\antispam\CleantalkValidate::class Adding middleware
  4. Open the terminal in the root of your laravel application and run command to generate config file and javascript asset: php artisan vendor:publish
  5. Edit newly added configuration file config/cleantalk.php, type your access key and change enabled key to true Changing configuration
  6. Include cleantalk blade template to your root blade template into block: @include('cleantalk::cleantalk') Adding blade template
  7. So finally add the middleware to the required routes: ->middleware('cleantalk_antispam') Using middleware

Now you can test the protection on the route contains cleantalk_antispam middleware, just use [email protected] test email for email field.

Requirements:

laravel-antispam's People

Contributors

artemanoshin avatar bartjuh4 avatar glomberg avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.