Merge branch 'asif/contact' of gitlab.com:CIEFWorldwideSdnBhd/izyim-api into asif/contact

This commit is contained in:
Aqeeb Imtiaz Harun
2018-07-07 17:24:36 +08:00
19 changed files with 253 additions and 96 deletions
+5 -1
View File
@@ -27,7 +27,11 @@ class CompanyController extends Controller
return response($output);
}
else{return "error";}
else
{
return response()->json(['error'=>'Company not found'], 404);
}
}
public function update(Request $request)
@@ -32,16 +32,6 @@ class DeliveryinfoController extends Controller
{
$deliveryinfo = Deliveryinfo::where('com_id', Auth::user()->company())->where('id', $id)->first();
if (!$deliveryinfo)
{
return response()->json(['message'=>'Access Denied!'], 404);
}
$deliveryinfos = DB::table('deliveryinfos')
->select('id', 'branch', 'deli_info', 'address', 'city', 'postcode', 'state', 'country', 'contact_person', 'contact_person_no', 'com_id')
->where('com_id', Auth::user()->company())
->get();
return response()->json($deliveryinfo, 200);
}