ok
Direktori : /home2/selectio/public_html/3idiotsgadgetstore.in/app/Http/Controllers/api/v1/ |
Current File : /home2/selectio/public_html/3idiotsgadgetstore.in/app/Http/Controllers/api/v1/BrandController.php |
<?php namespace App\Http\Controllers\api\v1; use App\CPU\BrandManager; use App\CPU\Helpers; use App\Http\Controllers\Controller; use Illuminate\Http\Request; class BrandController extends Controller { public function get_brands() { try { $brands = BrandManager::get_active_brands(); } catch (\Exception $e) { } return response()->json($brands,200); } public function get_products($brand_id) { try { $products = BrandManager::get_products($brand_id); } catch (\Exception $e) { return response()->json(['errors' => $e], 403); } return response()->json($products,200); } }