mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/izyim-api.git
synced 2026-08-19 04:24:01 +00:00
commeted out delivery info test TBD
added delivery info index to show lists of delivery info for the company fixed delivery info show security
This commit is contained in:
@@ -8,6 +8,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.
|
||||
@@ -17,8 +22,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