getRootPath() . 'public/pc/index.html'; if (Request::isMobile()) { $template = app()->getRootPath() . 'public/mobile/index.html'; } if (file_exists($template)) { return view($template); } return JsonService::success($name); } }