middleware(['sysadmin', '2fa']); } public function filterHTML(){ } //content_links public function calcu() { /*$query = Booking::with('booking_draft_items')->select('booking.*')->where('new_drafts', true); $query->whereHas('booking_draft_items', function ($q) { $q->where('comfort', true); }); $bookings = $query->get(); foreach ($bookings as $booking){ $booking->comfort = true; $booking->save(); } */ $bookings = Booking::orderBy('id', 'DESC')->offset(0)->limit(1000)->get(); // dd("nothing"); $val = []; $text = ""; $data = [ 'text' => $text, 'bookings' => $bookings, ]; return view('sys.tools.links', $data); } /* clean code $travelGuides = TravelGuide::all(); foreach ($travelGuides as $travelGuide){ if(strpos($travelGuide->full_text, "


") !== false){ $val[$travelGuide->id] = "


"; } } foreach ($travelGuides as $travelGuide){ if(strpos($travelGuide->full_text, "id] = "full_text; // $new_text = preg_replace('/]*>([\s\S]*?)<\/h1[^>]*>/', '', $TravelGuide->full_text); */ public function calcuStore() { return redirect()->back(); } }