sync() public method

Sync fileable's files to fileable
public sync ( string $fileableId, array $fileIds = [] ) : void
$fileableId string fileable identifier
$fileIds array file identifier
return void
Example #1
0
 /**
  * set files
  *
  * @param Board $board board model
  * @param array $args  arguments
  * @return array
  * @todo 업데이트 할 때 중복 bind 되어 fileable 이 계속 증가하는 오류가 있음
  */
 protected function setFiles(Board $board, array $args)
 {
     $fileIds = [];
     if (empty($args['_files']) === false) {
         $this->storage->sync($board->getKey(), $args['_files']);
     }
     return $fileIds;
 }