map(function($elem) { return[ "Méretek:"=>$elem->polomeret, "Ár:"=>$elem->ar ]; }); return response()->json($adatok,200,["Content-Type"=>"application/json"]); } /** * Store a newly created resource in storage. */ public function store(Request $request) { // } /** * Display the specified resource. */ public function show(string $id) { // } /** * Update the specified resource in storage. */ public function update(Request $request, string $id) { $frissit = Polo::find($id); if(!$frissit){ return response("Sikertelen frissítés",400); } $frissit->update([ "ar"=>$request["ar"] ]); return response("Sikeres frissítés",200); } /** * Remove the specified resource from storage. */ public function destroy(string $id) { } }