email).".png"; if (Option::get('avatar_query_string') == "1") { $fname .= '?v='.$user->getAvatarId(); } return url("avatar/$size/$fname"); } } if (! function_exists('assets')) { function assets($relative_uri) { // add query string to fresh cache if (Str::startsWith($relative_uri, 'css') || Str::startsWith($relative_uri, 'js')) { return url("resources/dist/$relative_uri")."?v=".config('app.version'); } else { return url("resources/$relative_uri"); } } } if (! function_exists('json')) { function json() { @header('Content-type: application/json; charset=utf-8'); $args = func_get_args(); if (count($args) == 1 && is_array($args[0])) { return Response::json($args[0]); } elseif(count($args) == 2) { return Response::json([ 'errno' => $args[1], 'msg' => $args[0] ]); } } }