Get API with Parameter

 How to Get API with Parameter.?

Go to the Controller and create the Method.

function listparam($id=null)
    {
        return ClientModel::find($id);

    } 


Now also change the API Routes

Route::get("lists/{id}", [DBController::class, 'listparam']);

Now OutPut Result





Comments

Popular posts from this blog

get data with API