1 | <?php |
||
9 | class Attachment extends Model |
||
10 | { |
||
11 | protected $table = 'attachments'; |
||
12 | public $timestamps = true; |
||
13 | protected $fillable = ['filename', 'mime', 'imageable_type', 'imageable_id', 'encrypted', 'admin_only']; |
||
14 | |||
15 | public function imageable() |
||
19 | |||
20 | public static function upload($model, $files, $encrypted = false, $admin_only = false) |
||
39 | |||
40 | private static function encryptFileContents($file, $encrypt) |
||
48 | } |
||
49 |