How to upload a file with Validation in Laravel 10

File sharing has become a crucial aspect of life in the modern digital age, and many websites now allow users to share files. However, file uploading can also be a security concern if done incorrectly. Thus, it is essential to have a solid file validation system in place to ensure that the uploaded files meet specific requirements and do not contain any malicious content.

Laravel already has built-in file upload with validation functionality.

In this tutorial, I show how you can upload a file with validation in the Laravel 10 project.

How to upload a file with validation in Laravel

Read more

VPN/Proxy server Detection with IPHub API and PHP

If you are managing content based on the country then there is always a chance that a user tries to access other country content using VPN or Proxy.

If you are not validating it then the user can access the content.

In this tutorial, I show how you can detect VPN or Proxy server with IPHub API.

I am using PHP to get an IP address and send an API request.

VPN/Proxy server detection with IPHub API and PHP

Read more

DataTables AJAX Pagination with Search and Sort in CodeIgniter 4

Pagination is a widely used method to enhance user experience when displaying large amounts of data on a web page.

With the use of DataTables jQuery plugin you can easily implement pagination in your CodeIgniter 4 project. It adds different features along with pagination like – sorting, searching, and changing the number of rows view per page.

It allows adding pagination with and without AJAX.

In this tutorial, I show how you can implement DataTables AJAX pagination with search and sort in the CodeIgniter 4 project. I am using CSRF token in the example, if you don’t know how to enable it then you can view this tutorial.

DataTables AJAX Pagination with Search and Sort in CodeIgniter 4

Read more