public function getSpareParts($brand_id) { $data = []; $sparepart = new SpareParts(); $data = $sparepart->getSpareParts($brand_id); return response()->json($data); // $result = [ // 'data' => '' // ]; // $data = []; // $data[0] = [ // 'id' => $brand_id, // 'type' => 'wheel', // 'image' => 'assets/images/brand/wheel_ford.png', // 'description' => 'WHEEL_1', // 'price' => '4000$' // ]; // $data[1] = [ // 'id' => $brand_id, // 'type' => 'door', // 'image' => 'assets/images/brand/door_ford.png', // 'description' => 'DOOR_2', // 'price' => '6000$' // ]; // $result['data'] = $data; return response()->json($result); }
public function getSparepartMenu() { $shops = new SpareParts(); $data = $shops->getSparepartMenu(); return response()->json($data); }
public function getSparepartMenu() { $SparePartsMenu = SpareParts::where('id', '>', '0')->get(); return $SparePartsMenu; }