mein-sterntours/app/Services/SyS/ReCalcu.php
2023-01-25 12:47:23 +01:00

71 lines
1.6 KiB
PHP

<?php
namespace App\Services\SyS;
use Carbon;
use Request;
use App\Models\Booking;
use App\Models\IQContentTree;
use App\Models\IQContentTreeNode;
class ReCalcu
{
//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, "<h1><br></h1>") !== false){
$val[$travelGuide->id] = "<h1><br></h1>";
}
}
foreach ($travelGuides as $travelGuide){
if(strpos($travelGuide->full_text, "<h1") !== false){
$val[$travelGuide->id] = "<h1";
}
}
$travelGuide = TravelGuide::find(203);
$text = $travelGuide->full_text;
// $new_text = preg_replace('/<h1[^>]*>([\s\S]*?)<\/h1[^>]*>/', '', $TravelGuide->full_text);
*/
public function calcuStore()
{
return redirect()->back();
}
}