Home Laravel 9 Laravel 10 tutorial Search API

Laravel 10 tutorial Search API

1 min read
0
0
665

In this will teach you how to use the search criteria using Laravel 10 using restful API.i already done the Crud application using Laravel if you are not watch them please watch them here. you will learn the crud application in Laravel from scratch.

laravel search

First Step we have to defined the route path

Route::get('/search/{id}',[EmployeeController::class, 'search']);

After that in the EmployeeController class have to create function seach.

EmployeeController

   function search($id)
    {
        $employee = Employee::where('id',$id)->get();
        return response()->json( $employee);

    }

I have attached the video link below. which will do this tutorials step by step.

 

Load More Related Articles
Load More By admin
  • Build Crud API with Laravel 12

    In this tutorial will teach  Laravel 12 CRUD API  by step. Laravel  10 CRUD Application  w…
  • laravel 12 image upload tutorial

    In this lesson we talk about laravel 12 image uploading and display the image step by step…
  • Laravel 12 CRUD Application

    In this tutorial will teach Laravel 12 CRUD Application step by step. Laravel  12 CRUD App…
Load More In Laravel 9

Leave a Reply

Your email address will not be published. Required fields are marked *

Check Also

Bitcoin Live Casino Real Time Gaming 1

З Bitcoin Live Casino Real Time Gaming Explore live casino games powered by Bitcoin, offer…