mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim-api.git
synced 2026-08-22 05:54:18 +00:00
Merge branch 'zain/delivery-info' of gitlab.com:CIEFWorldwideSdnBhd/izyim-api into zain/delivery-info
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user