Daily Archives

4 Articles

Products

ImgShop

Posted on
ImgShop

Human are visual creatures! Research shows that 74% of blog visitors search for products based on items featured in pictures.

Own a website or blog? Make money from your image galleries.

FEATURES
  • Image Tagging with spots
  • Intelligent Tooltip position
  • Responsive tagged images
  • Images analytics dashboard
  • Auto generated HTML, JS, CSS code to use anywhere
  • Set currency to show on tags
  • One Click installation process
Products

Promotion Hub

Posted on
Promotion Hub

In today’s social world, not every social campaign goes viral and neither every social media post reaches the target audience. But this can all change via promotion hub. Make it easy for members of your organization or comapny to share company related content to personal social media networks. Reward socially engaged employees, increase organic reach of your brand

Products

Affiliate Manager

Posted on
Affiliate Manager

In today’s business and ecommerce world, you need a powerful tool to increase your e-commerce value. Affiliate Nation is a professional PHP affiliate software which has features to build a professional network of webmasters selling your products, goodd, membership subscription, or services.

Blog/Reviews

Restricted; A package that restricts usage of protected username

Posted on
Restricted; A package that restricts usage of protected username

Most of the time people want a username which is personal, and means something to them.

As developer, an admin or manager of any website, you would agree that sometimes, it’s important to be able to reserve certain names that you consider official. A good use case here is Twitter. No account names can contain Twitter or Admin unless they are official Twitter accounts.

Imagine you’re building an application that requires a dedicated URL like myapp.com/tailor, but then, a user signups with a username ‘tailor’. This would result in conflict as the system could malfunction trying to determine which URL request to respond to. It becomes even more complicated when a user signs up on your application using words such as; Admin, User, Reset, etc as their usernames while creating a profile on your application.

Why don’t we secure these important words by preventing it users from being able to use them in the first place? In response to this, we created a package – Laravel Restricted which tells the application to index all the application’s route segments and restrict users from choosing them as a username.

How to setup

Install via composer
composer require codulab/restricted

Add the following service provider to the array in: config/app.php

Codulab\Restricted\RestrictedServiceProvider::class,

Publish the config

php artisan vendor:publish --tag=restricted_config

Now, you can simply add ‘restricted’ to your validations in the controller like so:

$this->validate($request, [
'name' => 'required|string|min:5',
'username' => 'required|restricted' // You’re restricting the username field.
]);

You can also add a new validation message:

To view all the words you have ‘Restricted’, navigate to ‘public/restricted-usernames.txt’ file.

You should see this:

Now when you try to use one of the ‘Restricted’ usernames, you should see something similar to this:

    As far as your application requires a registration process, this package is a simple security measure to protect your website.

If you like Laravel Restricted, please STAR it, SHARE it with your friends, USE it and CONTRIBUTE to it.