How to send cURL request using HTTP Client in Laravel

When developing an application, you will at some point need to send cURL requests.

In Laravel, you can send a cURL request either using the default PHP way or using the Guzzle HTTP client package.

In this article, I show how you can easily send cURL request with less code using the HTTP client and read the return response in Laravel.

How to send cURL request using HTTP Client in Laravel

Read more

What is Database Seeding in Laravel?

In Laravel seeding is a process by which you can insert dummy or sample data into a database.

Seeding is a helpful tool for development because it allows you to insert data into your database table without having to write individual SQL statements. Seeder files are also easy to create and maintain.

With this, you can test the application without having to enter real data.

In this post, I provide a step-by-step guide on how to create and run a seed file in Laravel 9.

What is Database Seeding in Laravel?

Read more

How to Delete file from public folder – Laravel 9

If you allow the users to upload profile,  product, items photos, or documents and during updating file process if you are not deleting the previously uploaded file then in that case files keep getting stored and occupying space on the server.

In this tutorial, I am only covering file deletion not file upload. You can view this tutorial for file upload in Laravel.

How to Delete file from public folder - Laravel 9

Read more

How to add Custom filter in DataTable AJAX pagination in Laravel 9

DataTable by default has a single search box that uses for searching globally.

If default search filter is not fulfilling your requirement then you can customize and add you own filter elements like – dropdown, date filter, textbox, etc.

In this tutorial, I show how you can add custom filter in DataTable AJAX pagination in Laravel 9.

How to add Custom filter in DataTable AJAX pagination in Laravel

Read more