mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-11 03:51:06 +03:30
fix
This commit is contained in:
@@ -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 );
|
||||
|
||||
Reference in New Issue
Block a user