Category Archives: Laravel

Laravel 5 : How to create middleware to check custom headers for REST API with example

While creating a REST API we generally need to check headers data, For REST API, headers play vital role to make more secure to the APIs. In this article i am going to tell you how to create middleware to check custom headers for REST API with an example. For REST API we generally use API token and… Read More »

Laravel validate different types of Date Format with Laravel validator

Laravel provides different types of validators. But in this article i will let you know how to validate different types of Date Format with laravel validator. Laravel provides different type of date validations like date after, date_format, after_or_equal:date, before:date, before_or_equal:date etc and these validation rules support all the date format supported by PHP’s Date class. In this example, we… Read More »

How to block IP addresses from accessing a web application with an example in Laravel

Sometimes we need to stop the false traffic or a scrapper from accessing our web application.  So in this article, i will let you know how to block IP addresses from accessing a web application with an example in Laravel. It will also help for Denial of service (DOS) attack. It is very important topic for a web deveoper… Read More »

Laravel middleware to remove/trim empty white spaces from user input

In this Laravel article i will let you know to create Laravel middleware to remove/trim empty white spaces from user input. Sometimes an user searches for an empty string and get an empty result becauase empty string behave like a character which is corerct but not a good practice for security reason to send user data directly into the… Read More »

Laravel 5 custom middleware for 301 redirection to non index.php url

Since we all know that index.php in the url is not a seo frriendly url. So if we go an application for production we generally optimize web application’s url. So inthis article i will let you know about Laravel 5 custom middleware for 301 redirection to non index.php url. Basically to achieve the url without index.php in laravel we… Read More »

PHP Laravel database seeder example with some sample user data insertion

Before jumping to anything, the first thing that may come to your mind “what is seeder” and “how can we use it in our laravel application”. Here in this article we are going to learn PHP Laravel database seeder example with some sample user data insertion and learn how to use database seeder in laravel. As a developer, while… Read More »

Create secure password protected web pages and files through htaccess

Hello friends, Today we will learn to create secure password protected web pages and files through .htaccess in easy steps. Sometimes in our project we need to protect web pages and files from an unauthorized person. You will also have seen many websites where their some pages have password protected or by username and password. So anybody who… Read More »

Laravel Elastic search integration from scratch with example

When we are building a large or medium level applications we generally want to create a search module and today’s time we all want to get fast searching results with auto suggest. And this can be very fast with elastic search. In this article i will let you know laravel elastic search integration from scratch with example. Elastic… Read More »

Laravel5 create and upload Grayscale Image with example

If you need to create grey scale image from an image in your laravel application, then you can learn and integrate this feature in this article. In this acticle i will let you know Laravel5 create and upload Grayscale Image with example. You will upload an image then it will convert that image to grey scale image and will… Read More »

Laravel 5 table column sorting and pagination example with kyslik/column-sortable

When we create report in our laravel application. We generally show the reports in table format. Sometimes we need to implement sorting on some columns. So that in this example i will show  laravel table columnsorting and pagination with laravel’s kyslik/column-sortable package. Column sorting is important feature for reporting. You can easily integrate in you application. When we you… Read More »