last 12.21

This commit is contained in:
Kevin Adametz 2021-12-25 02:53:44 +01:00
parent 73e38a006e
commit 3df0e93c2c
14 changed files with 395 additions and 43 deletions

View file

@ -38,7 +38,8 @@ class ContentLinkController extends Controller
//content_links
public function index()
{
/*$query = Booking::with('booking_draft_items')->select('booking.*')->where('new_drafts', true);
/*$query = Booking::with('booking_draft_items')->select('booking.*')->where('new_drafts', true);
$query->whereHas('booking_draft_items', function ($q) {
$q->where('comfort', true);
@ -49,10 +50,27 @@ class ContentLinkController extends Controller
$booking->save();
}
*/
dd("nothing");
$bookings = Booking::orderBy('id', 'DESC')->offset(0)->limit(1000)->get();
// dd("nothing");
$val = [];
$text = "";
/* $travelGuides = TravelGuide::all();
$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, "<h1><br></h1>") !== false){
$val[$travelGuide->id] = "<h1><br></h1>";
@ -71,13 +89,6 @@ class ContentLinkController extends Controller
// $new_text = preg_replace('/<h1[^>]*>([\s\S]*?)<\/h1[^>]*>/', '', $TravelGuide->full_text);
*/
$data = [
'text' => $text,
'values' => $val,
];
return view('sys.tools.links', $data);
}
public function store()
{