/** * generate token and store in session to prevent * malicius attack * @param null $key * @return null */ public static function crf($key = null) { $token = self::generate($key); Sessions::token('current_token', $token); return Sessions::get('current_token'); }