file_hash = md5($uid . wp_rand(0, 1000)); }); } public function setSettingsAttribute($settings) { $this->attributes['settings'] = \maybe_serialize($settings); } public function getSettingsAttribute($settings) { return Helper::safeUnserialize($settings); } /** * Accessor to get dynamic full_name attribute * @return string */ public function getSecureUrlAttribute() { return add_query_arg([ 'fst_file' => $this->file_hash, 'secure_sign' => md5($this->id . date('YmdH')) ], site_url('/index.php')); } }