Merge branch 'zain/delivery-info' of gitlab.com:CIEFWorldwideSdnBhd/izyim-api into zain/delivery-info

This commit is contained in:
Asif
2018-06-20 11:05:04 +08:00
3 changed files with 47 additions and 18 deletions
@@ -9,6 +9,11 @@ use Auth;
class DeliveryinfoController extends Controller
{
public function index()
{
$deliveryinfo = Deliveryinfo::where('com_id', Auth::user()->company())->get();
return response()->json($deliveryinfo, 200);
}
/**
* Display the specified delivery-info.
@@ -18,8 +23,7 @@ class DeliveryinfoController extends Controller
*/
public function show(Deliveryinfo $id)
{
$deliveryinfo = deliveryinfo::find($id);
$deliveryinfo = Deliveryinfo::where('com_id', Auth::user()->company())->where('id', $id)->firstOrFail();
return response()->json($deliveryinfo, 200);
}