src/Mgallegos/DecimaFile/File/Repositories/File/EloquentFile.php
public function bySystemReferenceTypeBySystemReferenceIdAndByOrganization($systemReferenceType , $systemReferenceId, $organizationId, $databaseConnectionName = null)
   {
     if(empty($databaseConnectionName))
     {
       $databaseConnectionName = $this->databaseConnectionName;
     }

     return $this->File->setConnection($databaseConnectionName)
      ->where('system_reference_type', '=', $systemReferenceType)
      ->where('system_reference_id', '=', $systemReferenceId)
      ->where('organization_id', '=', $organizationId)
      ->get();
   }
public function bySystemReferenceTypeBySystemReferenceIdAndByOrganization($systemReferenceType , $systemReferenceId, $organizationId, $databaseConnectionName = null)
   {
     if(empty($databaseConnectionName))
     {
       $databaseConnectionName = $this->databaseConnectionName;
     }

     return $this->File->setConnection($databaseConnectionName)
      ->where('system_reference_type', '=', $systemReferenceType)
      ->where('system_reference_id', '=', $systemReferenceId)
      ->where('organization_id', '=', $organizationId)
      ->get();
   }
public function bySystemReferenceTypeBySystemReferenceIdAndByOrganization ( $ systemReferenceType , $ systemReferenceId , $ organizationId , $ databaseConnectionName = null ) { if ( empty ( $ databaseConnectionName ) ) { $ databaseConnectionName = $ this -> databaseConnectionName ; } return $ this -> File -> setConnection ( $ databaseConnectionName ) -> where ( 'system_reference_type' , '=' , $ systemReferenceType ) -> where ( 'system_reference_id' , '=' , $ systemReferenceId ) -> where ( 'organization_id' , '=' , $ organizationId ) -> get ( ) ; }
Retrieve files by system reference type and system reference id

@param  int $id parent id

@return Illuminate\Database\Eloquent\Collection
Retrieve files by system reference type and system reference id