public function punycode(Request $request, Texts $textsModel, functions $functions) { $Punycode = new Punycode(); $method = $request->input('method'); $source = $request->input('source'); if ($method == '') { $method = 'to_puny'; } if ($method == "to_puny") { $res = $Punycode->encode($source); } else { $res = $Punycode->decode($source); } $langLinks = $functions->giveLangLinks($request->url()); $params = $textsModel->getLocaleOf('punicode'); return view('indexuse', ['params' => $params, 'res' => $res, 'source' => $source, 'method' => $method, 'langLinks' => $langLinks]); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index(Request $request, Texts $textsModel, functions $functions) { $langLinks = $functions->giveLangLinks($request->url()); $params = $textsModel->getLocaleOf('index'); return view('indexuse', ['params' => $params, 'langLinks' => $langLinks]); }