Download the PHP package jeremykenedy/laravel-blocker without Composer
On this page you can find all versions of the php package jeremykenedy/laravel-blocker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-blocker
Laravel Blocker
Laravel Blocker (LaravelBlocker) is a middleware interface to block users, emails, ip addresses, domain names, cities, states, countries, continents, and regions from using your application, logging in, or registering. The types of items to be blocked can be extended to what you think via a seed. The items you are blocking have a CRUD interface along with a softdeletes interface.
Table of contents
- Features
- Requirements
- Required Packages
- Installation Instructions
- Publish All Assets
- Publish Specific Assets
- Usage
- Configuration
- Environment File
- Routes
- Screenshots
- File Tree
- License
Can work out the box with or without the following roles packages:
- jeremykenedy/laravel-roles
- spatie/laravel-permission
- Zizaco/entrust
- romanbican/roles
- ultraware/roles
Features
LaravelBlocker Features |
---|
Easy to use middlware that can be applied directly to controller and/or routes |
Full CRUD (Create, Read, Update, Delete) interface for adding blocked items |
Lots of easily customizable options through .env file variables |
Seeded blocked types with ability to add own published seeds |
Seeded blocked items with ability to add own published seeds |
Softdeletes with easy to use restore and destroy interface |
Uses laravelcollective/html package for secure HTML forms |
Uses eklundkristoffer/seedster for optional default seeds |
Makes use of proper custom request classes structure |
Can use pagination if desired for dashboards |
Front end Bootstrap version can be changed |
Uses localization language files |
Ajax search for blocked items |
Configurable blocked action |
Requirements
Required Packages
(included in this package)
Installation Instructions
-
From your projects root folder in terminal run:
Laravel 5.8+ use:
Laravel 5.7 and below use:
- Register the package
-
Laravel 5.5 and up Uses package auto discovery feature, no need to edit the
config/app.php
file. - Laravel 5.4 and below
Register the package with laravel in
config/app.php
underproviders
with the following:
In config/app.php
section under aliases
with the following:
- Publish the packages views, config file, assets, and language files by running the following from your projects root folder:
Publish All Assets
Publish Specific Assets
Usage
From Route File:
- You can include the
checkblocked
in a route groups or on individual routes.
Route Group Example:
Individual Route Examples:
From Controller File:
- You can include the
checkblocked
in the contructor of your controller file.
Controller File Example:
Configuration
There are many configurable options which have all been extended to be able to configured via .env
file variables. Editing the configuration file directly is not needed becuase of this.
- See config file: laravelblocker.php.
- See default Types Seed: DefaultBlockedTypeTableSeeder.php
- See default Blocked Items seed: DefaultBlockedItemsTableSeeder.php
Testing, Faker, and this package
This package is great at blocking unwanted content from your application, but your configuration may conflict with auto generated content in your Laravel Factories. A common example is when your application is set to block email addresses that match @example.com, one of the most common email address TLD generated by $faker->safeEmail
.
To avoid this package throwing inaccurate failures with auto-generated models, make sure you disable this package in your phpunit.xml
configuration file:
Environment File
Routes
Routes In-depth
Screenshots
File Tree
- Tree command can be installed using brew:
brew install tree
- File tree generated using command
tree -a -I '.git|node_modules|vendor|storage|tests'
License
LaravelBlocker is licensed under the MIT license. Enjoy!
Contributors
Thanks goes to these wonderful people (emoji key):
Jeremy Kenedy 💻 |
---|
This project follows the all-contributors specification. Contributions of any kind welcome!
All versions of laravel-blocker with dependencies
eklundkristoffer/seedster Version ^7.0
laravelcollective/html Version ^6.4