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:
![](https://www.devopsschool.com/blog/wp-content/uploads/2020/08/image-18-1024x576.png)
Thanks
![loading](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/gallery-page-loader.gif)
![play](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/playhover.png)
Laravel 5.5 CRUD Tutorial, Introduction And Agenda Overview, Laravel Training Part – 1 DevopsSchool
![loading](https://www.devopsschool.com/blog/wp-content/plugins/youtube-embed-plus/images/gallery-page-loader.gif)
Latest posts by Usha Kiran (see all)
- How to Login with Token in Laravel PHP Framework? - October 30, 2021
- How to merge two or multiple tables to each other in the Laravel PHP Framework? (Part-4) - October 29, 2021
- How to display a table in a Verticle or Horizontal form in the Laravel PHP Framework? Part-2 - October 29, 2021