file_hash = md5($uid.mt_rand(0,1000)); }); } /** * 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')); } }