Ejemplo n.º 1
0
 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]);
 }
Ejemplo n.º 2
0
 /**
  * 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]);
 }