Download the PHP package nawrasbukhari/restricted without Composer
On this page you can find all versions of the php package nawrasbukhari/restricted. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download nawrasbukhari/restricted
More information about nawrasbukhari/restricted
Files in nawrasbukhari/restricted
Download nawrasbukhari/restricted
More information about nawrasbukhari/restricted
Files in nawrasbukhari/restricted
Vendor nawrasbukhari
Package restricted
Short Description Restricts registration when a user's input (eg: username) matches a list of restricted words
License MIT
Package restricted
Short Description Restricts registration when a user's input (eg: username) matches a list of restricted words
License MIT
Please rate this library. Is it a good library?
Informations about the package restricted
Restricted
Restricted allows you to restrict your users from signing up with reserved words.
Reserved words can be:
- Your route segments - Example, you have this route: www.mywebsite.com/login and your application allows to view user profile like this: www.mywebsite.com/username This package can crawl all your routes and return a validation message when a user tries to register with such words like "login"
- Words you just want to reserve - Example: cart, products, admin etc. These words can be added manually to the reserved.txt file. after running the "restricted:index" command.
Installation
To install Restricted use composer
Download
Publish the config
Usage
First, we need to crawl and index the application routes by running the command:
Now, you can simply add restricted to your validations like so:
You can also add a new validation message
Settings
- file_path: (string) File name and path to save the indexed words
- index_level: (int) How deep do u want us to crawl your routes? ExAMPLE => www.mywebsite.com/segment1/segment2/segment3. setting this value to '2', will allow indexing of segment1 and segment2 and exclude segment3
- merge: (bool) should we to merge the new results with the old ones
License
MIT license - free to use and abuse!
All versions of restricted with dependencies
PHP Build Version
Package Version
Requires
php Version
^8.0.2
illuminate/support Version ^9.45.1
illuminate/validation Version ^9.45.1
illuminate/routing Version ^9.45.1
illuminate/console Version ^9.45.1
illuminate/support Version ^9.45.1
illuminate/validation Version ^9.45.1
illuminate/routing Version ^9.45.1
illuminate/console Version ^9.45.1
The package nawrasbukhari/restricted contains the following files
Loading the files please wait ....