mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-12 07:01:06 +03:30
a little changes in retrieve data based on roles.
This commit is contained in:
@@ -117,7 +117,7 @@ class ItemController extends Controller
|
||||
|
||||
$Items = Item::where( "status" , StatusTypeEnum::APPROVED )
|
||||
->where( "package_id" , null )
|
||||
->where('creator_id', $userId)
|
||||
->where('user_id', $userId)
|
||||
->orderByDesc( 'id' )
|
||||
->isNotRepaired()
|
||||
->get();
|
||||
|
||||
@@ -77,6 +77,7 @@ class PackageController extends Controller
|
||||
public function getPackages()
|
||||
{
|
||||
$Packages = Package::where("status", StatusTypeEnum::APPROVED)
|
||||
->where("user_id", auth('api')->id())
|
||||
->orderByDesc('id')
|
||||
->get();
|
||||
return PackageResource::collection($Packages);
|
||||
|
||||
Reference in New Issue
Block a user