How to upload a file using jQuery AJAX in Laravel 10

File uploads are a common requirement for many web applications in web development. Uploading files using the old-fashioned way takes time and causes the page to refresh, disrupting the user experience. jQuery AJAX makes it easy to upload files without having to refresh the page.

Require to send CSRF token with AJAX request to upload the file in Laravel.

In this tutorial, I show how you can upload a file using jQuery AJAX with Validation and display preview in Laravel 10.

How to upload a file using jQuery AJAX in Laravel

Read more

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