Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Blacklist Bundle Laravel Package

antoinelemaire/blacklist-bundle

View on GitHub
Deep Wiki
Context7

AntoineLemaireBlacklistBundle

Blacklist system with integration in Symfony. Just insert blacklist value/type combinaison inside database and use Annotation to assert.

Example Database

Installation

Add the package to your composer.json file

"antoinelemaire/blacklist-bundle": "dev-master",

Add this to app/AppKernel.php

<?php
    public function registerBundles()
    {
        $bundles = array(
            ...
            new AntoineLemaire\BlacklistBundle\AntoineLemaireBlacklistBundle(),
        );

        ...

        return $bundles;
    }

Configuration

Sonata admin:

sonata_admin:
    dashboard:
        groups:
            antoinelemaire_blacklist:
                label: Blacklist
                label_catalogue: AntoineLemaireBlacklistBundle
                items:
                    - AntoineLemaire\BlacklistBundle\Admin\BlacklistAdmin

Usage

Available types:

  • email
  • email_domain (when 'email=true' is defined, apply the constraint only on the domain part of the value)
  • ip
class User
{
    /**
     * @var string
     
     * @IsNotBlacklisted(type="email")
     * @IsNotBlacklisted(type="email_domain", email=true)
     */
    private $email;
    
    /**
     * @var string
     
     * @IsNotBlacklisted(type="ip", message="This IP is blacklisted.")
     */
    private $ip;
    
}
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
phalcon/cli-options-parser
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
directorytree/privacy-filter-classifier
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata