I'm using laravel 8 on api call it is giving such type of error
public function getSalesman(){
$salesman = Salesman::where('deleted_at', '=', null)->get(['id', 'name']);
return response()->json([
'salesman' => $salesman,
]);
}
CodePudding user response:
may be you have not show method in this controller!