This commit is contained in:
sajjad
2023-09-23 02:41:07 -07:00
80 changed files with 1401 additions and 461 deletions
+10 -10
View File
@@ -29,8 +29,8 @@
->when( $request->has( 'name' ) && $request->name != '' , function ( $query ) use ( $request ) {
$query->where( 'name' , 'LIKE' , '%' . $request->name . '%' );
} )
->when( $request->has( 'udi' ) && $request->udi != '' , function ( $query ) use ( $request ) {
$query->where( 'udi' , 'LIKE' , '%' . $request->udi . '%' );
->when( $request->has( 'uid' ) && $request->uid != '' , function ( $query ) use ( $request ) {
$query->where( 'uid' , 'LIKE' , '%' . $request->uid . '%' );
} )
->when( $request->has( 'size' ) && $request->size != '' , function ( $query ) use ( $request ) {
$query->where( 'size' , $request->size );
@@ -68,15 +68,15 @@
} ,
'user.medical_center' => function ( $query ) {
$query->select( 'id' , 'name' );
} ] );
} ] );
$FilesPath = [];
if ( count( $Item->files ) ) {
foreach ( $Item->files as $Key => $File ) {
$FilesPath[] = $File->path;
}
$Item[ 'filesPath' ] = $FilesPath;
$FilesPath = [];
if ( count( $Item->files ) ) {
foreach ( $Item->files as $Key => $File ) {
$FilesPath[] = $File->path;
}
$Item[ 'filesPath' ] = $FilesPath;
}
return \MessageResponse::data( $Item );
}
@@ -89,7 +89,7 @@
'unique_id' => $request->unique_id ,
'specific' => $request->specific ,
'note' => $request->note ,
'udi' => $request->udi ,
'uid' => $request->uid ,
'user_id' => auth( 'api' )->user()->id ,
];
$ItemObj = Item::create( $ItemData );