Download the PHP package andrey-helldar/spammers without Composer

On this page you can find all versions of the php package andrey-helldar/spammers. 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 spammers

Spammers for Laravel 5.4+

Simple package to prevent accessing of spammers to Laravel application.

spammers

StyleCI Total Downloads Latest Stable Version Latest Unstable Version

Installation

To get the latest version of this package, simply require the project using Composer:

Instead, you may of course manually update your require block and run composer update if you so choose:

If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php:

Helldar\Spammers\ServiceProvider::class,

Next, call php artisan vendor:publish and php artisan migrate commands after set up config/spammers.php file and install the migrations by running php artisan migrate command.

Now, use spammer() helper and Artisan commands.

Documentation

Helpers Store

Store IP-address in a spam-table:

spammer()
    ->ip('1.2.3.4')
    ->store();

// or

spammer('1.2.3.4')->store();

Delete IP-address from a spam-table:

spammer()
    ->ip('1.2.3.4')
    ->delete();

// or

spammer('1.2.3.4')->delete();

Restore IP-address from a spam-table:

spammer()
    ->ip('1.2.3.4')
    ->restore();

// or

spammer('1.2.3.4')->restore();

Check exists IP-address in a spam-table:

spammer()
    ->ip('1.2.3.4')
    ->exists();

// or

spammer('1.2.3.4')->exists();

Helpers Accessing

To save an IP address with the URL in the database, use the helper spammer()->access():

spammer()
    ->access()
    ->ip('1.2.3.4')
    ->url('/foo/bar')
    ->store();

// or

spammer('1.2.3.4')
    ->access()
    ->url('/foo/bar')
    ->store();

Ban when attempts to get pages with errors exceed a given number.

Example:

Default, permanent ban.

Middleware

Next, add link to middleware in $routeMiddleware block in app/Http/Kernel.php file, and use him in $middlewareGroups blocks:

Or you can specify globally in the attribute $middleware of the Http/Kernel.php file:

Console Command

This package maybe called in a console:

spam:amnesty
spam:store 1.2.3.4
spam:delete 1.2.3.4
spam:restore 1.2.3.4
spam:exists 1.2.3.4

The spam:amnesty command allows you to delete IP-addresses that have expired.

Additional

You can use a Helldar\Spammers\Models\Spammer model. His extended Illuminate\Database\Eloquent\Model.

Simple Using

You can specify globally in the attribute $middleware of the Http/Kernel.php file:

Next, in the report() method of file app\Exceptions\Handler.php, add the call to the spammer()->access() helper:

And add a rule to the schedule() method of the app/Console/Kernel.php file:

Execute the commands:

Customize the file config/spammers.php for your purposes.

Profit!

Copyright and License

Laravel Spammers was written by Andrey Helldar for the Laravel framework 5.4 or later, and is released under the MIT License. See the LICENSE file for details.

Translation

Translations of text and comment by Google Translate. Help with translation +1 in karma :)


All versions of spammers with dependencies

PHP Build Version
Package Version
Requires php Version ^5.6|^7.0|^8.0
illuminate/console Version ^5.4|^6.0|^7.0|^8.0
illuminate/database Version ^5.4|^6.0|^7.0|^8.0
illuminate/http Version ^5.4|^6.0|^7.0|^8.0
illuminate/support Version ^5.4|^6.0|^7.0|^8.0
illuminate/validation Version ^5.4|^6.0|^7.0|^8.0
jaybizzle/laravel-crawler-detect Version ^1.2
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 andrey-helldar/spammers contains the following files

Loading the files please wait ....