Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 public function getSparepartMenu()
 {
     $shops = new SpareParts();
     $data = $shops->getSparepartMenu();
     return response()->json($data);
 }
Exemplo n.º 3
0
 public function getSparepartMenu()
 {
     $SparePartsMenu = SpareParts::where('id', '>', '0')->get();
     return $SparePartsMenu;
 }