getFileableTable() public method

Get a fileable table name
public getFileableTable ( ) : string
return string
Example #1
0
 /**
  * set the target be not have a file
  *
  * @param string $fileableId fileable identifier
  * @param File   $file       file instance
  * @param bool   $remove     remove file when given true
  * @return void
  */
 public function unBind($fileableId, File $file, $remove = false)
 {
     $file->getConnection()->table($file->getFileableTable())->where('fileId', $file->getKey())->where('fileableId', $fileableId)->delete();
     $file->useCount--;
     if ($remove === true && $file->useCount < 1) {
         $this->remove($file);
     } else {
         $file->save();
     }
 }