Create Livewire pagination with Search filter and Sorting in Laravel

Pagination is very useful when you have to show a huge list of records on the page. It divides the records into multiple pages.

Limited number of records shown at a time.

Livewire has provided the WithPagination trait for generating pagination. Its implementation is similar to Laravel default pagination.

In this tutorial, I show how you can create Livewire pagination with search filter and sorting in Laravel 9.

Create Livewire pagination with search filter and sorting in Laravel

Read more

What is Accessors And Mutators in Laravel 9?

Sometimes need to modify a field value while retrieving records using Laravel Eloquent e.g. get date from datetime field, make field value in upper case, etc.

To do that you can either use selectRaw() or Accessors.

Similarly, If you want to update the value while inserting or updating using Eloquent then you can either modify value every time before storing or use Mutators.

In this tutorial, I show how you can use Accessors And Mutators in the Laravel 9 project.

What is Accessors And Mutators in Laravel?

Read more

Add CSV Excel PDF Export buttons in Yajra DataTables – Laravel

DataTables allows to export data in multiple formats like – CSV, Excel, and Pdf. This is not by default enabled.

Required including some more libraries to start using it.

In this tutorial, I show how you can add export buttons in Yajra DataTable in Laravel 9.

I am assuming you have already installed and set up the Yajra DataTable package if not then you can view this tutorial.

Add CSV Excel PDF Export buttons in Yajra DataTables - Laravel

Read more