public function index()
 {
     $page = 'instituto-bulla';
     $websiteSettings = \App\Exceptions\Handler::readFile("websiteSettings.json");
     $pages = Pages::where('slug', '=', $page)->first();
     $text = Texts::find(19);
     return view('website.bullaInstitute.index')->with(compact('page', 'pages', 'websiteSettings', 'text'));
 }
예제 #2
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]);
 }
 public function index()
 {
     $page = 'conselhos-regionais';
     $websiteSettings = \App\Exceptions\Handler::readFile("websiteSettings.json");
     $pages = Pages::where('slug', '=', $page)->first();
     $text = Texts::find(10);
     return view('website.regionalCouncils.index')->with(compact('page', 'pages', 'websiteSettings', 'text'));
 }
 public function index()
 {
     $page = 'seu-negocio-mais-lucrativo';
     $websiteSettings = \App\Exceptions\Handler::readFile("websiteSettings.json");
     $pages = Pages::where('slug', '=', $page)->first();
     $text = Texts::find(18);
     return view('website.yourBusinessMoreLucrative.index')->with(compact('page', 'pages', 'websiteSettings', 'text'));
 }
 public function index()
 {
     $page = 'universidade-teuto';
     $websiteSettings = \App\Exceptions\Handler::readFile("websiteSettings.json");
     $pages = Pages::where('slug', '=', $page)->first();
     $text = Texts::find(4);
     return view('website.teutoUniversity.index')->with(compact('page', 'pages', 'websiteSettings', 'text'));
 }
 public function index()
 {
     $page = 'farmacovigilancia';
     //WEBSITE SETTINGS
     $websiteSettings = \App\Exceptions\Handler::readFile("websiteSettings.json");
     $pages = Pages::where('slug', '=', $page)->first();
     $text = Texts::find(6);
     return view('website.farmacovigilance.index')->with(compact('page', 'websiteSettings', 'pages', 'text'));
 }
 public function legislation()
 {
     $page = 'medicamentos-genericos';
     $websiteSettings = \App\Exceptions\Handler::readFile("websiteSettings.json");
     $pages = Pages::where('slug', '=', $page)->first();
     $text = Texts::find(3);
     $categories = LegislationCategories::orderBy('legislationCategoriesId', 'ASC')->get();
     return view('website.genericsMedications.legislation')->with(compact('page', 'pages', 'websiteSettings', 'categories', 'text'));
 }
 public function index()
 {
     $page = 'o-teuto';
     $websiteSettings = \App\Exceptions\Handler::readFile("websiteSettings.json");
     $pages = Pages::where('slug', '=', $page)->first();
     $text = Texts::find(1);
     $movie = Texts::find(17);
     return view('website.theTeuto.index')->with(compact('page', 'pages', 'websiteSettings', 'text', 'movie'));
 }
 public function putUpdate(Request $request)
 {
     if (!ACL::hasPermission('teutoUniversity', 'edit')) {
         return redirect(route('home'))->withErrors(['Você não tem permissão para editar a Universidade Teuto.']);
     }
     $this->validate($request, ['text' => 'required'], ['text.required' => 'Informe o texto']);
     $text = Texts::find($this->textsId);
     $text->text = $request->text;
     $text->save();
     $success = "Texto editado com sucesso!";
     return redirect(route('teutoUniversity'))->with(compact('success'));
 }
 public function putUpdate(Request $request)
 {
     if (!ACL::hasPermission('yourBusinessMoreLucrative', 'edit')) {
         return redirect(route('yourBusinessMoreLucrative'))->withErrors(['Você não tem permissão para editar o texto do Seu Negócio + Lucrativo.']);
     }
     $this->validate($request, ['text' => 'required'], ['text.required' => 'Informe o texto']);
     $text = Texts::find($this->textsId);
     $text->text = $request->text;
     $text->save();
     $success = "Texto editado com sucesso!";
     return redirect(route('yourBusinessMoreLucrative'))->with(compact('success'));
 }
 public function index()
 {
     $page = 'trabalhe-conosco';
     //WEBSITE SETTINGS
     $websiteSettings = \App\Exceptions\Handler::readFile("websiteSettings.json");
     $pages = Pages::where('slug', '=', $page)->first();
     $link = Texts::find(5);
     $mainText = Texts::find(16);
     $complementText = Texts::find(12);
     $vacancies = WorkWithUsVacancies::orderBy('sortorder', 'asc')->get();
     return view('website.workWithUs.index')->with(compact('page', 'websiteSettings', 'pages', 'link', 'mainText', 'complementText', 'vacancies'));
 }
 public function putUpdate(Request $request)
 {
     if (!ACL::hasPermission('farmacovigilance', 'edit')) {
         return redirect(route('home'))->withErrors(['Você não tem permissão para editar o contato.']);
     }
     $this->validate($request, ['text' => 'required', 'emails' => 'required'], ['text.required' => 'Informe o texto', 'emails.required' => 'Informe os e-mails']);
     $text = Texts::find($this->textsId);
     $text->text = $request->text;
     $text->save();
     $emails = EmailsFarmacovigilance::find(1);
     $emails->emails = $request->emails;
     $emails->save();
     $success = "Dados editados com sucesso!";
     return redirect(route('farmacovigilance'))->with(compact('success'));
 }
 public function index()
 {
     $page = 'contato';
     //WEBSITE SETTINGS
     $websiteSettings = \App\Exceptions\Handler::readFile("websiteSettings.json");
     //STATES
     $statesConsult = \App\Exceptions\Handler::readFile("states.json");
     $states = ['' => 'Estado'];
     foreach ($statesConsult as $state) {
         $states[$state['name']] = $state['name'];
     }
     $pages = Pages::where('slug', '=', $page)->first();
     $text = Texts::find(2);
     return view('website.contact.index')->with(compact('page', 'websiteSettings', 'pages', 'states', 'text'));
 }
 public function putUpdate(Request $request)
 {
     if (!ACL::hasPermission('theTeuto', 'edit')) {
         return redirect(route('theTeuto'))->withErrors(['Você não tem permissão para editar o texto sobre O Teuto.']);
     }
     $this->validate($request, ['text' => 'required', 'video' => 'required'], ['text.required' => 'Informe o texto', 'video.required' => 'Informe a URL do vídeo']);
     $text = Texts::find($this->textsId);
     $text->text = $request->text;
     $text->save();
     $video = Texts::find($this->videoId);
     $video->text = $request->video;
     $video->save();
     $success = "Texto editado com sucesso!";
     return redirect(route('theTeuto'))->with(compact('success'));
 }
 public function putUpdate(Request $request)
 {
     if (!ACL::hasPermission('workWithUs', 'edit')) {
         return redirect(route('home'))->withErrors(['Você não tem permissão para editar a página Trabalhe Conosco.']);
     }
     $this->validate($request, ['mainText' => 'required', 'complementText' => 'required', 'homeText' => 'required', 'link' => 'required', 'image' => 'image|mimes:jpeg,gif,png'], ['mainText.required' => 'Informe o texto principal', 'complementText.required' => 'Informe o texto complementar', 'homeText.required' => 'Informe o texto da home', 'link.required' => 'Informe o link externo', 'image.image' => 'Envie um formato de imagem válida', 'image.mimes' => 'Formatos suportados: .jpg, .gif e .png']);
     $mainText = Texts::find($this->mainTextId);
     $mainText->text = $request->mainText;
     $mainText->save();
     $complementText = Texts::find($this->complementTextId);
     $complementText->text = $request->complementText;
     $complementText->save();
     $homeText = Texts::find($this->homeTextId);
     $homeText->text = $request->homeText;
     $homeText->save();
     $link = Texts::find($this->linkId);
     $link->text = $request->link;
     $link->save();
     if ($request->image) {
         //DELETE OLD IMAGE
         if ($request->currentImage != "") {
             if (File::exists($this->folder . $request->currentImage)) {
                 File::delete($this->folder . $request->currentImage);
             }
         }
         //IMAGE
         $extension = $request->image->getClientOriginalExtension();
         $nameImage = Carbon::now()->format('YmdHis') . "." . $extension;
         $image = Image::make($request->file('image'));
         if ($request->imageCropAreaW > 0 or $request->imageCropAreaH > 0 or $request->imagePositionX or $request->imagePositionY) {
             $image->crop($request->imageCropAreaW, $request->imageCropAreaH, $request->imagePositionX, $request->imagePositionY);
         }
         $image->resize($this->imageWidth, $this->imageHeight)->save($this->folder . $nameImage);
         $imageDB = Texts::find($this->imageId);
         $imageDB->text = $nameImage;
         $imageDB->save();
     }
     $success = "Dados editados com sucesso!";
     return redirect(route('workWithUs'))->with(compact('success'));
 }
 public function index()
 {
     $page = 'home';
     $websiteSettings = \App\Exceptions\Handler::readFile("websiteSettings.json");
     $pages = Pages::where('slug', '=', $page)->first();
     $banners = Banners::orderByRaw("RAND()")->get();
     $newsAndReleases = NewsAndReleases::orderBy('date', 'desc')->limit(6)->get();
     foreach ($newsAndReleases as $item) {
         array_set($item, 'date', Carbon::createFromFormat('Y-m-d', $item->date));
     }
     $blog = Blog::orderBy('date', 'desc')->limit(3)->get();
     foreach ($blog as $item) {
         array_set($item, 'date', Carbon::createFromFormat('Y-m-d', $item->date));
     }
     $products = Products::getHomeCategories();
     $workWithUsHomeText = Texts::find($this->homeTextId);
     $workWithUsLink = Texts::find($this->linkId);
     $workWithUsImage = Texts::find($this->imageId);
     $calls = Calls::orderByRaw("RAND()")->limit(3)->get();
     $videoTheTeuto = Texts::find($this->videoTheTeuto);
     return view('website.home')->with(compact('page', 'pages', 'websiteSettings', 'banners', 'newsAndReleases', 'blog', 'products', 'workWithUsHomeText', 'workWithUsLink', 'workWithUsImage', 'calls', 'videoTheTeuto'));
 }
예제 #17
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]);
 }
 public function getScheduleYourVisit()
 {
     $page = 'visite-bem';
     $websiteSettings = \App\Exceptions\Handler::readFile("websiteSettings.json");
     $pages = Pages::where('slug', '=', $page)->first();
     //STATES
     $statesConsult = \App\Exceptions\Handler::readFile("states.json");
     $states = ['' => 'Estado'];
     foreach ($statesConsult as $state) {
         $states[$state['name']] = $state['name'];
     }
     $text = Texts::find(21);
     return view('website.visitWell.scheduleYourVisit')->with(compact('page', 'pages', 'websiteSettings', 'states', 'text'));
 }
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     Texts::destroy($id);
     Session::flash('flash_message', 'Texts successfully deleted!');
     return redirect('texts');
 }