Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

How to Add New Row on top into a table in the Laravel PHP Framework? Part-2

How to Add New Row on top into a table in the Laravel PHP Framework?

Here, We’ll see the adding of new row on top instead of adding in down.

Part-1 Search Functionality with Pagination.

Step 1. Use the DB class inside the this app/Https/Controllers/ServiceController.php file

use Illuminate\Support\Facades\DB;

Step 2. Go to the app/Https/Controllers/ServiceController.php file and write down the following code:

Thanks