Tree Travel Guide
This commit is contained in:
parent
a1ca534f55
commit
1f340e96fa
78 changed files with 4133 additions and 1027 deletions
|
|
@ -4,6 +4,8 @@ namespace App\Http\Controllers\CMS;
|
|||
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\IQContentTree;
|
||||
use App\Models\IQContentTreeNode;
|
||||
use App\Models\TravelGuide;
|
||||
use App\Models\TravelPageGuide;
|
||||
use AppBundle\Util;
|
||||
|
|
@ -47,12 +49,16 @@ class CMSTravelGuideController extends Controller
|
|||
|
||||
public function page()
|
||||
{
|
||||
|
||||
//make tree
|
||||
$data = [
|
||||
'travel_guide_pages' => TravelPageGuide::getPageGuides(),
|
||||
];
|
||||
|
||||
return view('cms.travel_guide.page', $data);
|
||||
}
|
||||
|
||||
|
||||
public function detail($id)
|
||||
{
|
||||
if($id == "new") {
|
||||
|
|
@ -78,7 +84,6 @@ class CMSTravelGuideController extends Controller
|
|||
|
||||
}
|
||||
|
||||
|
||||
public function cleanHTML($html)
|
||||
{
|
||||
|
||||
|
|
|
|||
274
app/Http/Controllers/IQ/ContentModalController.php
Executable file
274
app/Http/Controllers/IQ/ContentModalController.php
Executable file
|
|
@ -0,0 +1,274 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\IQ;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\IQContentArea;
|
||||
use App\Models\IQContentAreaSection;
|
||||
use App\Models\IQContentModel;
|
||||
use App\Models\IQContentModelField;
|
||||
use App\Models\IQContentSite;
|
||||
use App\Models\IQContentTree;
|
||||
use App\Models\IQContentTreeNode;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Request;
|
||||
use Input;
|
||||
|
||||
class ContentModalController extends Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* ContentSiteController constructor.
|
||||
*/
|
||||
public function __construct()
|
||||
{
|
||||
// $this->middleware('auth');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
* @throws \Throwable
|
||||
* data = id, model, action, request
|
||||
*/
|
||||
public function load()
|
||||
{
|
||||
if(\Request::ajax()){
|
||||
$data = Input::all();
|
||||
$ret = "";
|
||||
if(isset($data['model']) && isset($data['id']) ){
|
||||
switch ($data['model']){
|
||||
case 'model' :
|
||||
$ret = $this->loadModal($data);
|
||||
break;
|
||||
case 'area' :
|
||||
$ret = $this->loadModal($data);
|
||||
break;
|
||||
case 'media' :
|
||||
break;
|
||||
case 'site' :
|
||||
$ret = $this->loadModal($data);
|
||||
break;
|
||||
case 'tree' :
|
||||
$ret = $this->loadModal($data);
|
||||
break;
|
||||
}
|
||||
}
|
||||
return response()->json(['response' => $data, 'html'=>$ret]);
|
||||
}
|
||||
}
|
||||
|
||||
private function loadModal($data)
|
||||
{
|
||||
if(isset($data['action'])){
|
||||
switch ($data['action']){
|
||||
case 'model-content' :
|
||||
return $this->actionModelContent($data);
|
||||
break;
|
||||
case 'model-field' :
|
||||
return $this->actionModelField($data);
|
||||
break;
|
||||
case 'model-field-details' :
|
||||
return $this->actionModelFieldDetail($data);
|
||||
break;
|
||||
case 'area-content' :
|
||||
return $this->actionArea($data);
|
||||
break;
|
||||
case 'area-section' :
|
||||
return $this->actionAreaSection($data);
|
||||
break;
|
||||
case 'site-content' :
|
||||
return $this->actionSiteContent($data);
|
||||
break;
|
||||
case 'tree-content' :
|
||||
return $this->actionTreeContent($data);
|
||||
break;
|
||||
case 'tree-node' :
|
||||
return $this->actionTreeNode($data);
|
||||
break;
|
||||
case 'tree-site-content' :
|
||||
return $this->actionTreeSiteContent($data);
|
||||
break;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Model
|
||||
*/
|
||||
private function actionModelContent($data)
|
||||
{
|
||||
|
||||
if($data['id'] == "add"){
|
||||
$value = new IQContentModel();
|
||||
$value->id = "add";
|
||||
$value->active = true;
|
||||
$data['title'] = "Add Model";
|
||||
}else {
|
||||
$value = IQContentModel::findOrFail($data['id']);
|
||||
$data['title'] = "Edit Model: ".$value->name;
|
||||
}
|
||||
$url = route('iq_content_model_detail', [$value->id]);
|
||||
return view("iq.modal.content", compact('data','value', 'url') )->render();
|
||||
}
|
||||
|
||||
private function actionModelField($data)
|
||||
{
|
||||
$value = new Collection();
|
||||
$value->id = $data['id'];
|
||||
|
||||
if(isset($data['request']['model_id'])){
|
||||
$model = IQContentModel::findOrFail($data['request']['model_id']);
|
||||
return view("iq.modal.model-field", compact('data','value', 'model') )->render();
|
||||
}
|
||||
return view("iq.modal.model-field", compact('data','value') )->render();
|
||||
|
||||
}
|
||||
|
||||
private function actionModelFieldDetail($data)
|
||||
{
|
||||
if(!isset($data['request']['model_id'])){
|
||||
//need 404 error page
|
||||
}
|
||||
$model = IQContentModel::findOrFail($data['request']['model_id']);
|
||||
$data['field'] = '';
|
||||
switch ($data['request']['field']){
|
||||
case 'text' :
|
||||
$data['field'] = 'Long Text';
|
||||
//return $this->actionContent($data);
|
||||
break;
|
||||
case 'string' :
|
||||
$data['field'] = 'Short Text';
|
||||
//return $this->actionField($data);
|
||||
break;
|
||||
case 'media' :
|
||||
$data['field'] = 'Media';
|
||||
//return $this->actionFieldDetail($data);
|
||||
break;
|
||||
}
|
||||
|
||||
if($data['id'] == "add"){
|
||||
$value = new IQContentModelField();
|
||||
$value->id = "add";
|
||||
$value->active = true;
|
||||
}else {
|
||||
$value = IQContentModelField::findOrFail($data['id']);
|
||||
}
|
||||
|
||||
|
||||
return view("iq.modal.model-field-detail", compact('data','value', 'model') )->render();
|
||||
}
|
||||
|
||||
/*
|
||||
* Area
|
||||
*/
|
||||
private function actionArea($data)
|
||||
{
|
||||
if($data['id'] == "add"){
|
||||
$value = new IQContentArea();
|
||||
$value->id = "add";
|
||||
$value->active = true;
|
||||
$data['title'] = "Add Area";
|
||||
}else {
|
||||
$value = IQContentArea::findOrFail($data['id']);
|
||||
$data['title'] = "Edit Area: ".$value->name;
|
||||
}
|
||||
$url = route('iq_content_area_detail', [$value->id]);
|
||||
|
||||
return view("iq.modal.content", compact('data','value', 'url') )->render();
|
||||
}
|
||||
|
||||
private function actionAreaSection($data)
|
||||
{
|
||||
$model = IQContentArea::findOrFail($data['request']['area_id']);
|
||||
if($data['id'] == "add"){
|
||||
$value = new IQContentAreaSection();
|
||||
$value->id = "add";
|
||||
$value->active = true;
|
||||
$data['title'] = "Add Section";
|
||||
}else {
|
||||
$value = IQContentAreaSection::findOrFail($data['id']);
|
||||
$data['title'] = "Edit Section: ".$value->name;
|
||||
}
|
||||
$url = route('iq_content_area_detail', [$value->id]);
|
||||
|
||||
return view("iq.modal.area-section", compact('data','value', 'url', 'model') )->render();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* site
|
||||
*/
|
||||
private function actionSiteContent($data)
|
||||
{
|
||||
if($data['id'] == "add"){
|
||||
$value = new IQContentSite();
|
||||
$value->id = "add";
|
||||
$value->active = true;
|
||||
$data['title'] = "Add Site";
|
||||
}else {
|
||||
$value = IQContentSite::findOrFail($data['id']);
|
||||
$data['title'] = "Edit Site: ".$value->name;
|
||||
}
|
||||
$url = route('iq_content_site_detail', [$value->id]);
|
||||
return view("iq.modal.site", compact('data','value', 'url') )->render();
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* tree
|
||||
*/
|
||||
private function actionTreeContent($data)
|
||||
{
|
||||
if($data['id'] == "add"){
|
||||
$value = new IQContentTree();
|
||||
$value->id = "add";
|
||||
$value->active = true;
|
||||
$data['title'] = "Add Tree";
|
||||
}else {
|
||||
$value = IQContentTree::findOrFail($data['id']);
|
||||
$data['title'] = "Edit Tree: ".$value->name;
|
||||
}
|
||||
$url = route('iq_content_tree_detail', [$value->id]);
|
||||
return view("iq.modal.content", compact('data','value', 'url') )->render();
|
||||
}
|
||||
|
||||
private function actionTreeNode($data)
|
||||
{
|
||||
$model = IQContentTree::findOrFail($data['request']['tree_id']);
|
||||
|
||||
if($data['id'] == "add"){
|
||||
$value = new IQContentTreeNode();
|
||||
$value->id = "add";
|
||||
$value->active = true;
|
||||
$data['title'] = "Add Node";
|
||||
}else {
|
||||
$value = IQContentTreeNode::findOrFail($data['id']);
|
||||
$data['title'] = "Edit Node: ".$value->name;
|
||||
}
|
||||
$url = route('iq_content_tree_detail', [$model->id]);
|
||||
return view("iq.modal.tree-node", compact('data','value', 'url', 'model') )->render();
|
||||
}
|
||||
|
||||
|
||||
private function actionTreeSiteContent($data)
|
||||
{
|
||||
if($data['id'] == "add"){
|
||||
$value = new Collection();
|
||||
$value->active = true;
|
||||
$value->id = 'add';
|
||||
$data['title'] = "Seite hinzufügen";
|
||||
|
||||
}else {
|
||||
$value = new Collection();
|
||||
$data['title'] = "Edit Site: ".$value->name;
|
||||
}
|
||||
|
||||
$url = route('iq_content_tree_detail', [$data['request']['tree_id'], $data['request']['tree_node_id']]);
|
||||
|
||||
$data['request'] = false;
|
||||
return view("iq.modal.site", compact('data','value', 'url') )->render();
|
||||
}
|
||||
|
||||
}
|
||||
257
app/Http/Controllers/IQ/ContentTreeController.php
Executable file
257
app/Http/Controllers/IQ/ContentTreeController.php
Executable file
|
|
@ -0,0 +1,257 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\IQ;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
use App\Models\IQContentTree;
|
||||
use App\Models\IQContentTreeNode;
|
||||
use App\Models\TravelGuide;
|
||||
use App\Models\TravelPageGuide;
|
||||
use App\Repositories\IQ\ContentSiteRepository;
|
||||
use Illuminate\Http\Request;
|
||||
use Input;
|
||||
use Validator;
|
||||
|
||||
class ContentTreeController extends Controller
|
||||
{
|
||||
|
||||
protected $contentSiteRepo;
|
||||
/**
|
||||
* ContentSiteController constructor.
|
||||
*/
|
||||
public function __construct(ContentSiteRepository $contentSiteRepo)
|
||||
{
|
||||
$this->middleware('admin');
|
||||
$this->contentSiteRepo = $contentSiteRepo;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$data = [
|
||||
'models' => IQContentTree::all(),
|
||||
];
|
||||
return view('cms.travel_guide.tree', $data);
|
||||
}
|
||||
|
||||
|
||||
public function detail($id, $node_id = false, $area_section_id = false)
|
||||
{
|
||||
$model = IQContentTree::findOrFail($id);
|
||||
$tree_node = IQContentTreeNode::find($node_id);
|
||||
$area_section = false;
|
||||
$site_fields = false;
|
||||
|
||||
if($area_section_id){
|
||||
/*
|
||||
* $area_section = IQContentAreaSection::findOrFail($area_section_id);
|
||||
$site_fields = $this->contentSiteRepo->siteFieldPrepare($tree_node->iq_content_site, $area_section);
|
||||
*/
|
||||
}
|
||||
$data = [
|
||||
'model' => $model,
|
||||
'area_section' => $area_section,
|
||||
'site_fields' => $site_fields,
|
||||
'tree_node' => $tree_node,
|
||||
'id' => $id,
|
||||
];
|
||||
return view('cms.travel_guide.tree-detail', $data);
|
||||
}
|
||||
|
||||
public function repair($id=1){
|
||||
|
||||
$model = IQContentTree::findOrFail($id);
|
||||
$travel_guide_pages = TravelPageGuide::getPageGuides($model->root_id);
|
||||
$page_parent_id = [];
|
||||
$pos = 1;
|
||||
$tree_node = new IQContentTreeNode();
|
||||
foreach ($travel_guide_pages as $guide_page){
|
||||
|
||||
$slug = $guide_page->slug;
|
||||
|
||||
if(TravelGuide::whereSlug($slug)->count()){
|
||||
$slug = "";
|
||||
}
|
||||
//make travel Guide
|
||||
$description = substr($guide_page->description, 0, 255);
|
||||
$description = substr($guide_page->description, 0, strrpos($description, " "));
|
||||
|
||||
$keywords = substr($guide_page->keywords, 0, 255);
|
||||
$keywords = substr($guide_page->keywords, 0, strrpos($keywords, " "));
|
||||
$data = [
|
||||
'active' => $guide_page->status ? true : false,
|
||||
'scope' => false,
|
||||
'name' => $guide_page->title,
|
||||
'slug' => $slug,
|
||||
'text' => "page_id:".$guide_page->id,
|
||||
'full_text' => $guide_page->content_new,
|
||||
'keyword' => $guide_page->keyword,
|
||||
'meta_title' => $guide_page->pagetitle,
|
||||
'meta_description' => $description,
|
||||
'meta_keywords' => $keywords,
|
||||
];
|
||||
$TravelGuide = TravelGuide::create($data);
|
||||
|
||||
|
||||
if(!isset($page_parent_id[$guide_page->parent_id])){
|
||||
$page_parent_id[$guide_page->parent_id] = $tree_node->id;
|
||||
}
|
||||
if($guide_page->lvl == 1){
|
||||
$pos = 0;
|
||||
$parent_id = null;
|
||||
}else{
|
||||
$pos++;
|
||||
$parent_id = $page_parent_id[$guide_page->parent_id];
|
||||
|
||||
}
|
||||
$lvl = $guide_page->lvl-1;
|
||||
//make tree node
|
||||
$tree_data = [
|
||||
'tree_id' => $model->id,
|
||||
'parent_id' => $parent_id,
|
||||
'lvl' => $lvl,
|
||||
'name' => $guide_page->title,
|
||||
'identifier' => $guide_page->slug,
|
||||
'settings' => "page_id:".$guide_page->id,
|
||||
'pos' => $pos,
|
||||
'active' => $guide_page->status ? true : false,
|
||||
];
|
||||
$tree_node = IQContentTreeNode::create($tree_data);
|
||||
|
||||
|
||||
$TravelGuide->tree_node_id = $tree_node->id;
|
||||
$TravelGuide->save();
|
||||
|
||||
if($guide_page->travel_guide_content_id > 0){
|
||||
$TravelGuide = TravelGuide::find($guide_page->travel_guide_content_id);
|
||||
if($TravelGuide){
|
||||
$TravelGuide->tree_node_id = $tree_node->id;
|
||||
$TravelGuide->save();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
die("--");
|
||||
|
||||
}
|
||||
public function store($id, $node_id = false, $area_section_id = false)
|
||||
{
|
||||
$data = Input::all();
|
||||
//new sort
|
||||
if(isset($data['nestable-output'])){
|
||||
$model = IQContentTree::findOrFail($id);
|
||||
$model->updated_at = now();
|
||||
$model->save();
|
||||
$this->saveNestableOutput($model, json_decode($data['nestable-output']));
|
||||
|
||||
\Session()->flash('alert-save', '1');
|
||||
return redirect(route('iq_content_tree_detail', [$model->id]));
|
||||
}
|
||||
if(isset($data['iq_content_site_field']) && is_array($data['iq_content_site_field'])){
|
||||
$model = IQContentTree::findOrFail($id);
|
||||
$model->updated_at = now();
|
||||
$model->save();
|
||||
$this->contentSiteRepo->storeContentSideFields($data['iq_content_site_field']);
|
||||
|
||||
\Session()->flash('alert-save', '1');
|
||||
return redirect(route('iq_content_tree_detail', [$model->id, $node_id, $area_section_id]));
|
||||
}
|
||||
|
||||
|
||||
$rules = array(
|
||||
'name' => 'required',
|
||||
);
|
||||
$validator = Validator::make(Input::all(), $rules);
|
||||
if ($validator->fails()) {
|
||||
return back()->withErrors($validator);
|
||||
}
|
||||
$data['user_id'] = \Auth::user()->id;
|
||||
$data['active'] = isset($data['active']) ? true : false;
|
||||
$data['search'] = isset($data['search']) ? true : false;
|
||||
|
||||
if (isset($data['action'])) {
|
||||
switch ($data['action']) {
|
||||
case 'tree-content' :
|
||||
if($data['id'] == 0){
|
||||
$model = IQContentTree::create($data);
|
||||
}else{
|
||||
$model = IQContentTree::find($data['id']);
|
||||
$model->fill($data);
|
||||
$model->save();
|
||||
}
|
||||
\Session()->flash('alert-save', '1');
|
||||
return redirect(route('iq_content_tree_detail', [$model->id]));
|
||||
break;
|
||||
case 'tree-node' :
|
||||
$model = IQContentTree::findOrFail($id);
|
||||
$model->updated_at = now();
|
||||
$model->save();
|
||||
|
||||
if($data['id'] == 0){
|
||||
$tree_node = IQContentTreeNode::create($data);
|
||||
}else{
|
||||
$tree_node = IQContentTreeNode::find($data['id']);
|
||||
$tree_node->fill($data);
|
||||
$tree_node->save();
|
||||
}
|
||||
\Session()->flash('alert-save', '1');
|
||||
return redirect(route('iq_content_tree_detail', [$model->id, $tree_node->id]));
|
||||
break;
|
||||
case 'tree-site-content' :
|
||||
/* if($data['id'] == 0){
|
||||
$contentSite = IQContentSite::create($data);
|
||||
}else{
|
||||
$contentSite = IQContentSite::find($data['id']);
|
||||
$contentSite->fill($data);
|
||||
$contentSite->save();
|
||||
}*/
|
||||
|
||||
$model = IQContentTree::findOrFail($id);
|
||||
$model->updated_at = now();
|
||||
$model->save();
|
||||
|
||||
$tree_node = IQContentTreeNode::findOrFail($node_id);
|
||||
// $tree_node->site_id = $contentSite->id;
|
||||
$tree_node->save();
|
||||
|
||||
$travel_guide = TravelGuide::findOrFail($data['travel_guide_id']);
|
||||
$travel_guide->tree_node_id = $tree_node->id;
|
||||
$travel_guide->save();
|
||||
|
||||
\Session()->flash('alert-save', '1');
|
||||
return redirect(route('iq_content_tree_detail', [$id, $node_id]));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public function remove($id, $node_id, $travel_guide_id){
|
||||
$model = IQContentTree::findOrFail($id);
|
||||
$tree_node = IQContentTreeNode::findOrFail($node_id);
|
||||
$tavel_guide = TravelGuide::findOrFail($travel_guide_id);
|
||||
$tavel_guide->tree_node_id = null;
|
||||
$tavel_guide->save();
|
||||
\Session()->flash('alert-success', __('Seite aus Tree entfernt.'));
|
||||
return redirect(route('iq_content_tree_detail', [$id, $node_id]));
|
||||
|
||||
|
||||
}
|
||||
|
||||
private function saveNestableOutput(IQContentTree $contentTree, $list, $pos=0, $lvl = 0, $parent_id = null){
|
||||
|
||||
foreach ($list as $item){
|
||||
$tree_node = IQContentTreeNode::find($item->id);
|
||||
$tree_node->lvl = $lvl;
|
||||
$tree_node->parent_id = $parent_id;
|
||||
$tree_node->pos = $pos++;
|
||||
$tree_node->save();
|
||||
if(isset($item->children)) {
|
||||
$this->saveNestableOutput($contentTree, $item->children, $pos, $lvl + 1, $tree_node->id);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -22,6 +22,9 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
|||
* @method static \Illuminate\Database\Query\Builder|\App\Models\Account withTrashed()
|
||||
* @method static \Illuminate\Database\Query\Builder|\App\Models\Account withoutTrashed()
|
||||
* @mixin \Eloquent
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Account query()
|
||||
*/
|
||||
class Account extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -83,6 +83,9 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereWebsiteId($value)
|
||||
* @mixin \Eloquent
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking query()
|
||||
*/
|
||||
class Booking extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -60,6 +60,9 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @property-read \App\Models\Booking $booking
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingDraftItem whereFewoLodgingId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingDraftItem wherePrice($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingDraftItem newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingDraftItem newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingDraftItem query()
|
||||
*/
|
||||
class BookingDraftItem extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -30,6 +30,9 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent whereText($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent query()
|
||||
*/
|
||||
class CMSContent extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -27,6 +27,9 @@ use PHPUnit\Framework\Constraint\Count;
|
|||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Country wherePhone($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Country whereRu($value)
|
||||
* @mixin \Eloquent
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Country newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Country newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Country query()
|
||||
*/
|
||||
class Country extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -20,6 +20,9 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @mixin \Eloquent
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\DraftItem[] $draft_items
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\TravelProgramDraft[] $travel_program_drafts
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Draft newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Draft newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Draft query()
|
||||
*/
|
||||
class Draft extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -46,6 +46,9 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\DraftItem whereService($value)
|
||||
* @property float|null $price
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\DraftItem wherePrice($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\DraftItem newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\DraftItem newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\DraftItem query()
|
||||
*/
|
||||
class DraftItem extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -21,6 +21,9 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\DraftItem[] $draft_items
|
||||
* @property string|null $color
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\DraftType whereColor($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\DraftType newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\DraftType newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\DraftType query()
|
||||
*/
|
||||
class DraftType extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -95,6 +95,11 @@ use HTMLHelper;
|
|||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereTreeRoot($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
* @property int|null $travel_guide_content_id
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereTravelGuideContentId($value)
|
||||
*/
|
||||
class Feedback extends Page
|
||||
{
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ use Reliese\Database\Eloquent\Model as Eloquent;
|
|||
* @property string $equipment
|
||||
* @property string $adress1
|
||||
* @property string $adress2
|
||||
* @property string $zip_code
|
||||
* @property string $zipcode
|
||||
* @property string $city
|
||||
* @property int $maximum_persons
|
||||
* @property float $deposit
|
||||
|
|
@ -35,6 +35,29 @@ use Reliese\Database\Eloquent\Model as Eloquent;
|
|||
* @property \Illuminate\Database\Eloquent\Collection $travel_user_booking_fewos
|
||||
* @package App\Models
|
||||
* @mixin \Eloquent
|
||||
* @property string|null $single_name
|
||||
* @property string $zip_code
|
||||
* @property int|null $maximum_adults
|
||||
* @property int|null $maximum_childs
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging whereAdress1($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging whereAdress2($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging whereCalendarVisible($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging whereCity($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging whereDeposit($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging whereDescription($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging whereEquipment($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging whereGroupId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging whereMaximumAdults($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging whereMaximumChilds($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging whereMaximumPersons($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging whereSingleName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging whereTypeId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodging whereZipCode($value)
|
||||
*/
|
||||
class FewoLodging extends Model
|
||||
{
|
||||
|
|
@ -60,7 +83,7 @@ class FewoLodging extends Model
|
|||
'equipment',
|
||||
'adress1',
|
||||
'adress2',
|
||||
'zip_code',
|
||||
'zipcode',
|
||||
'city',
|
||||
'maximum_persons',
|
||||
'deposit',
|
||||
|
|
|
|||
|
|
@ -18,6 +18,11 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @property \Illuminate\Database\Eloquent\Collection $fewo_lodging_group_images
|
||||
* @package App\Models
|
||||
* @mixin \Eloquent
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingGroup newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingGroup newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingGroup query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingGroup whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingGroup whereName($value)
|
||||
*/
|
||||
class FewoLodgingGroup extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -22,6 +22,16 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @property \App\Models\FewoLodgingGroup $fewo_lodging_group
|
||||
* @package App\Models
|
||||
* @mixin \Eloquent
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingGroupImage newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingGroupImage newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingGroupImage query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingGroupImage whereComp($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingGroupImage whereDescription($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingGroupImage whereFileName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingGroupImage whereFullFileName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingGroupImage whereGroupId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingGroupImage whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingGroupImage wherePos($value)
|
||||
*/
|
||||
class FewoLodgingGroupImage extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -21,6 +21,15 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @property \App\Models\FewoLodging $fewo_lodging
|
||||
* @package App\Models
|
||||
* @mixin \Eloquent
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingImage newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingImage newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingImage query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingImage whereDescription($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingImage whereFileName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingImage whereFullFileName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingImage whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingImage whereLodgingId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingImage wherePos($value)
|
||||
*/
|
||||
class FewoLodgingImage extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -17,6 +17,11 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @property \Illuminate\Database\Eloquent\Collection $fewo_lodgings
|
||||
* @package App\Models
|
||||
* @mixin \Eloquent
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingType newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingType newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingType query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingType whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoLodgingType whereName($value)
|
||||
*/
|
||||
class FewoLodgingType extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -21,6 +21,14 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @property \App\Models\FewoLodging $fewo_lodging
|
||||
* @package App\Models
|
||||
* @mixin \Eloquent
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoPrice newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoPrice newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoPrice query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoPrice whereFlatPrice($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoPrice whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoPrice whereLodgingId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoPrice wherePerNight($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoPrice whereSeasonId($value)
|
||||
*/
|
||||
class FewoPrice extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -21,6 +21,15 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @property \App\Models\FewoLodging $fewo_lodging
|
||||
* @package App\Models
|
||||
* @mixin \Eloquent
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoReservation newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoReservation newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoReservation query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoReservation whereFromDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoReservation whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoReservation whereLodgingId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoReservation whereStatus($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoReservation whereToDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoReservation whereType($value)
|
||||
*/
|
||||
class FewoReservation extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -22,6 +22,16 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @property \Illuminate\Database\Eloquent\Collection $fewo_prices
|
||||
* @package App\Models
|
||||
* @mixin \Eloquent
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoSeason newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoSeason newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoSeason query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoSeason whereDescription($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoSeason whereFromDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoSeason whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoSeason whereMinimumStay($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoSeason whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoSeason whereOnlyWeekday($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\FewoSeason whereToDate($value)
|
||||
*/
|
||||
class FewoSeason extends Model
|
||||
{
|
||||
|
|
|
|||
86
app/Models/IQContentTree.php
Normal file
86
app/Models/IQContentTree.php
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Cviebrock\EloquentSluggable\Sluggable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* App\Models\IQContentTree
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property string $identifier
|
||||
* @property string $slug
|
||||
* @property string|null $description
|
||||
* @property array|null $settings
|
||||
* @property int $pos
|
||||
* @property int $active
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property \Illuminate\Support\Carbon|null $deleted_at
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\IQContentTreeNode[] $iq_content_tree_nodes
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTree findSimilarSlugs($attribute, $config, $slug)
|
||||
* @method static bool|null forceDelete()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTree newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTree newQuery()
|
||||
* @method static \Illuminate\Database\Query\Builder|\App\Models\IQContentTree onlyTrashed()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTree query()
|
||||
* @method static bool|null restore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTree whereActive($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTree whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTree whereDeletedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTree whereDescription($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTree whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTree whereIdentifier($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTree whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTree wherePos($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTree whereSettings($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTree whereSlug($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTree whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\App\Models\IQContentTree withTrashed()
|
||||
* @method static \Illuminate\Database\Query\Builder|\App\Models\IQContentTree withoutTrashed()
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class IQContentTree extends Model
|
||||
{
|
||||
use Sluggable;
|
||||
use SoftDeletes;
|
||||
|
||||
protected $connection = 'mysql_stern';
|
||||
|
||||
protected $dates = ['deleted_at'];
|
||||
|
||||
protected $table = 'i_q_content_trees';
|
||||
|
||||
protected $fillable = [
|
||||
'name', 'identifier', 'description', 'settings', 'pos', 'active',
|
||||
];
|
||||
|
||||
protected $casts = ['settings' => 'array'];
|
||||
|
||||
public function sluggable()
|
||||
{
|
||||
return [
|
||||
'slug' => [
|
||||
'source' => 'name'
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
public function iq_content_tree_nodes()
|
||||
{
|
||||
return $this->hasMany('App\Models\IQContentTreeNode', 'tree_id', 'id')->orderBy('pos');
|
||||
}
|
||||
|
||||
public function setIdentifierAttribute( $value ) {
|
||||
if(!isset($value) || $value == ""){
|
||||
$this->attributes['identifier'] = Str::slug(pre_slug($this->name), '-');
|
||||
}else{
|
||||
$this->attributes['identifier'] = Str::slug(pre_slug($value), '-');
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
127
app/Models/IQContentTreeNode.php
Normal file
127
app/Models/IQContentTreeNode.php
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Cviebrock\EloquentSluggable\Sluggable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* App\Models\IQContentTreeNode
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $tree_id
|
||||
* @property int|null $parent_id
|
||||
* @property int $lvl
|
||||
* @property string $name
|
||||
* @property string $identifier
|
||||
* @property string $slug
|
||||
* @property string|null $description
|
||||
* @property array|null $settings
|
||||
* @property int $pos
|
||||
* @property int $active
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @property \Illuminate\Support\Carbon|null $deleted_at
|
||||
* @property-read \App\Models\IQContentTree $iq_content_tree
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\IQContentTreeNode[] $iq_content_tree_node_childs
|
||||
* @property-read \App\Models\IQContentTreeNode|null $iq_content_tree_node_parent
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTreeNode findSimilarSlugs($attribute, $config, $slug)
|
||||
* @method static bool|null forceDelete()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTreeNode newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTreeNode newQuery()
|
||||
* @method static \Illuminate\Database\Query\Builder|\App\Models\IQContentTreeNode onlyTrashed()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTreeNode query()
|
||||
* @method static bool|null restore()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTreeNode whereActive($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTreeNode whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTreeNode whereDeletedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTreeNode whereDescription($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTreeNode whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTreeNode whereIdentifier($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTreeNode whereLvl($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTreeNode whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTreeNode whereParentId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTreeNode wherePos($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTreeNode whereSettings($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTreeNode whereSlug($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTreeNode whereTreeId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentTreeNode whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\App\Models\IQContentTreeNode withTrashed()
|
||||
* @method static \Illuminate\Database\Query\Builder|\App\Models\IQContentTreeNode withoutTrashed()
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class IQContentTreeNode extends Model
|
||||
{
|
||||
use Sluggable;
|
||||
use SoftDeletes;
|
||||
|
||||
protected $connection = 'mysql_stern';
|
||||
|
||||
|
||||
protected $dates = ['deleted_at'];
|
||||
|
||||
protected $table = 'i_q_content_tree_nodes';
|
||||
|
||||
protected $fillable = [
|
||||
'tree_id', 'parent_id', 'lvl', 'name', 'identifier', 'description', 'settings', 'pos', 'active',
|
||||
];
|
||||
|
||||
protected $casts = ['settings' => 'array'];
|
||||
|
||||
public function sluggable()
|
||||
{
|
||||
return [
|
||||
'slug' => [
|
||||
'source' => 'name'
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
public function iq_content_tree()
|
||||
{
|
||||
return $this->belongsTo('App\Models\IQContentTree', 'tree_id');
|
||||
}
|
||||
|
||||
public function iq_content_tree_node_parent()
|
||||
{
|
||||
return $this->belongsTo('App\Models\IQContentTreeNode', 'parent_id');
|
||||
}
|
||||
|
||||
public function iq_content_tree_node_childs()
|
||||
{
|
||||
return $this->hasMany('App\Models\IQContentTreeNode', 'parent_id', 'id');
|
||||
}
|
||||
|
||||
public function travel_guides()
|
||||
{
|
||||
return $this->hasMany('App\Models\TravelGuide', 'tree_node_id', 'id');
|
||||
}
|
||||
|
||||
|
||||
public function setIdentifierAttribute( $value ) {
|
||||
if(!isset($value) || $value == ""){
|
||||
$this->attributes['identifier'] = Str::slug(pre_slug($this->name), '-');
|
||||
}else{
|
||||
$this->attributes['identifier'] = Str::slug(pre_slug($value), '-');
|
||||
}
|
||||
}
|
||||
|
||||
public function getUri(){
|
||||
|
||||
$root = $this->iq_content_tree->identifier."/";
|
||||
$ret = $this->getParentIdentifier();
|
||||
|
||||
return $root.$ret.$this->identifier."/";
|
||||
}
|
||||
|
||||
public function getParentIdentifier(){
|
||||
if($node_parent = $this->iq_content_tree_node_parent){
|
||||
$ret = $node_parent->getParentIdentifier();
|
||||
return $ret.$node_parent->identifier."/";
|
||||
}
|
||||
}
|
||||
//
|
||||
}
|
||||
|
||||
|
|
@ -62,6 +62,9 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereWebsiteId($value)
|
||||
* @mixin \Eloquent
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead query()
|
||||
*/
|
||||
class Lead extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -92,6 +92,11 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereTreeRoot($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
* @property int|null $travel_guide_content_id
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereTravelGuideContentId($value)
|
||||
*/
|
||||
class Page extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -49,6 +49,9 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\SfGuardUser whereUserId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\SfGuardUser whereUsername($value)
|
||||
* @mixin \Eloquent
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\SfGuardUser newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\SfGuardUser newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\SfGuardUser query()
|
||||
*/
|
||||
class SfGuardUser extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -26,6 +26,9 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\SidebarWidget whereShowAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\SidebarWidget whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\SidebarWidget newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\SidebarWidget newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\SidebarWidget query()
|
||||
*/
|
||||
class SidebarWidget extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -17,6 +17,9 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Status whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Status whereName($value)
|
||||
* @mixin \Eloquent
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Status newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Status newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Status query()
|
||||
*/
|
||||
class Status extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -31,6 +31,9 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\Arrangement whereTypeS($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\Arrangement whereViewPosition($value)
|
||||
* @mixin \Eloquent
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\Arrangement newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\Arrangement newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\Arrangement query()
|
||||
*/
|
||||
class Arrangement extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -14,6 +14,9 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\ArrangementTemplate whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\ArrangementTemplate whereTitle($value)
|
||||
* @mixin \Eloquent
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\ArrangementTemplate newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\ArrangementTemplate newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\ArrangementTemplate query()
|
||||
*/
|
||||
class ArrangementTemplate extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -17,6 +17,9 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\TravelCountry whereIsCustomerCountry($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\TravelCountry whereName($value)
|
||||
* @mixin \Eloquent
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\TravelCountry newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\TravelCountry newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\TravelCountry query()
|
||||
*/
|
||||
class TravelCountry extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelAgenda whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelAgenda whereTravelcountryId($value)
|
||||
* @mixin \Eloquent
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelAgenda newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelAgenda newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelAgenda query()
|
||||
*/
|
||||
class TravelAgenda extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -19,6 +19,13 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @property \Illuminate\Database\Eloquent\Collection $travel_user_booking_fewos
|
||||
* @package App\Models
|
||||
* @mixin \Eloquent
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBookingFewoChannel newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBookingFewoChannel newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBookingFewoChannel query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBookingFewoChannel whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBookingFewoChannel whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBookingFewoChannel whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelBookingFewoChannel whereUpdatedAt($value)
|
||||
*/
|
||||
class TravelBookingFewoChannel extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -25,6 +25,9 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelClass whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\TravelProgramDraft[] $travel_program_drafts
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelClass newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelClass newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelClass query()
|
||||
*/
|
||||
class TravelClass extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -33,6 +33,9 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry query()
|
||||
*/
|
||||
class TravelCountry extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -36,6 +36,9 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelGuide whereText($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelGuide whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelGuide newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelGuide newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelGuide query()
|
||||
*/
|
||||
class TravelGuide extends Model
|
||||
{
|
||||
|
|
@ -55,9 +58,10 @@ class TravelGuide extends Model
|
|||
];
|
||||
|
||||
protected $fillable = [
|
||||
'name', 'slug', 'text', 'full_text', 'meta_title', 'meta_description', 'meta_keywords', 'pos', 'scope', 'active',
|
||||
'tree_node_id', 'name', 'slug', 'text', 'full_text', 'keyword', 'meta_title', 'meta_description', 'meta_keywords', 'pos', 'scope', 'active',
|
||||
];
|
||||
|
||||
|
||||
public function sluggable()
|
||||
{
|
||||
return [
|
||||
|
|
@ -67,6 +71,13 @@ class TravelGuide extends Model
|
|||
];
|
||||
}
|
||||
|
||||
|
||||
public function iq_content_tree_node()
|
||||
{
|
||||
return $this->belongsTo('App\Models\IQContentTreeNode', 'tree_node_id');
|
||||
}
|
||||
|
||||
|
||||
public static function getScopeOptions($setKey = false){
|
||||
$options = self::$scopes;
|
||||
$ret = "";
|
||||
|
|
@ -82,5 +93,29 @@ class TravelGuide extends Model
|
|||
}
|
||||
|
||||
|
||||
public static function getSiteOptions($id = false, $html = true, $choose = true) {
|
||||
|
||||
$values = [];
|
||||
$ret = "";
|
||||
$models = TravelGuide::where('active', 1)->get();
|
||||
|
||||
if($html) {
|
||||
if($choose){
|
||||
$ret .= '<option value="">Bitte wählen</option>\n';
|
||||
}
|
||||
foreach ($models as $model) {
|
||||
$attr = ($model->id == $id) ? ' selected="selected"' : '';
|
||||
$ret .= '<option value="' . $model->id . '"' . $attr . '>' . $model->name . ' ('.$model->getScopeName($model->scope).')</option>\n';
|
||||
}
|
||||
return $ret;
|
||||
}else{
|
||||
foreach ($models as $model) {
|
||||
$values[$model->id] = $model->name;
|
||||
}
|
||||
return $values;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -14,6 +14,9 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelNationality whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelNationality whereName($value)
|
||||
* @mixin \Eloquent
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelNationality newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelNationality newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelNationality query()
|
||||
*/
|
||||
class TravelNationality extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -18,6 +18,9 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelNationalityRequirement whereTravelCountryId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelNationalityRequirement whereTravelNationalityId($value)
|
||||
* @mixin \Eloquent
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelNationalityRequirement newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelNationalityRequirement newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelNationalityRequirement query()
|
||||
*/
|
||||
class TravelNationalityRequirement extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,6 +4,100 @@ namespace App\Models;
|
|||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* App\Models\TravelPageGuide
|
||||
*
|
||||
* @property int $id
|
||||
* @property int|null $owner
|
||||
* @property string|null $model
|
||||
* @property int|null $lvl
|
||||
* @property int $owner_second
|
||||
* @property int|null $catalog_id
|
||||
* @property int|null $catalog_index
|
||||
* @property string|null $slug
|
||||
* @property int|null $travel_program
|
||||
* @property int|null $status
|
||||
* @property int|null $show_in_navi
|
||||
* @property int|null $order
|
||||
* @property string|null $title
|
||||
* @property string|null $pagetitle
|
||||
* @property string|null $description
|
||||
* @property string|null $keywords
|
||||
* @property string|null $content
|
||||
* @property string|null $content_new
|
||||
* @property string|null $buma_destination
|
||||
* @property int|null $OLD_CatalogID
|
||||
* @property int|null $OLD_OwnerID
|
||||
* @property int|null $buma_gjr
|
||||
* @property string $date
|
||||
* @property int $price-tags
|
||||
* @property string|null $text_right
|
||||
* @property string|null $keyword
|
||||
* @property string|null $canonical_url
|
||||
* @property int|null $country_id
|
||||
* @property string|null $template
|
||||
* @property int|null $lft
|
||||
* @property int|null $rgt
|
||||
* @property int|null $tree_root
|
||||
* @property int|null $parent_id
|
||||
* @property string|null $real_url_path
|
||||
* @property int|null $travel_guide_content_id
|
||||
* @property string|null $box_body
|
||||
* @property string|null $box_image_url
|
||||
* @property string|null $box_star
|
||||
* @property string|null $box_discount
|
||||
* @property string|null $cms_settings
|
||||
* @property int|null $fewo_lodging
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereBoxBody($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereBoxDiscount($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereBoxImageUrl($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereBoxStar($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereBumaDestination($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereBumaGjr($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereCanonicalUrl($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereCatalogId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereCatalogIndex($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereCmsSettings($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereContent($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereContentNew($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereCountryId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereDescription($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereFewoLodging($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereKeyword($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereKeywords($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereLft($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereLvl($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereModel($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereOLDCatalogID($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereOLDOwnerID($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereOrder($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereOwner($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereOwnerSecond($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide wherePagetitle($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereParentId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide wherePriceTags($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereRealUrlPath($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereRgt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereShowInNavi($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereSlug($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereStatus($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereTemplate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereTextRight($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereTitle($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereTravelGuideContentId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereTravelProgram($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereTreeRoot($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelPageGuide whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class TravelPageGuide extends Model
|
||||
{
|
||||
protected $connection = 'mysql_stern';
|
||||
|
|
@ -26,8 +120,13 @@ class TravelPageGuide extends Model
|
|||
|
||||
private static $pages = [];
|
||||
|
||||
public static function getPageGuides($setKey = false){
|
||||
$values = self::where('model', 'travel_guide')->where('lvl', 1)->orderBy('order')->get();
|
||||
public static function getPageGuides($root_id = false){
|
||||
if($root_id){
|
||||
$values = self::where('tree_root', $root_id)->where('model', 'travel_guide')->where('lvl', 1)->orderBy('order')->get();
|
||||
}else{
|
||||
$values = self::where('model', 'travel_guide')->where('lvl', 1)->orderBy('order')->get();
|
||||
|
||||
}
|
||||
|
||||
foreach ($values as $value){
|
||||
self::$pages[] = $value;
|
||||
|
|
|
|||
|
|
@ -106,6 +106,9 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @property int|null $insurance_4
|
||||
* @property-read \App\Models\TravelProgramCountry $travel_program_country
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelProgram whereInsurance4($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelProgram newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelProgram newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelProgram query()
|
||||
*/
|
||||
class TravelProgram extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -15,6 +15,9 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelProgramCountry whereCountryId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelProgramCountry whereProgramId($value)
|
||||
* @mixin \Eloquent
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelProgramCountry newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelProgramCountry newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelProgramCountry query()
|
||||
*/
|
||||
class TravelProgramCountry extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -25,6 +25,9 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelProgramDraft whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelProgramDraft whereWeekdays($value)
|
||||
* @mixin \Eloquent
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelProgramDraft newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelProgramDraft newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelProgramDraft query()
|
||||
*/
|
||||
class TravelProgramDraft extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -43,6 +43,29 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @method static \Illuminate\Database\Query\Builder|\App\Models\TravelUser withTrashed()
|
||||
* @method static \Illuminate\Database\Query\Builder|\App\Models\TravelUser withoutTrashed()
|
||||
* @mixin \Eloquent
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUser newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUser newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUser query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUser whereBirthday($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUser whereCity($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUser whereCompany($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUser whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUser whereDeletedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUser whereEmail($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUser whereFax($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUser whereFirstName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUser whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUser whereLastName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUser whereLastUserData($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUser whereMobil($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUser wherePassword($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUser wherePhone($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUser whereSalutationId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUser whereStreet($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUser whereTitle($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUser whereTravelNationalityId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUser whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUser whereZipcode($value)
|
||||
*/
|
||||
class TravelUser extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -48,6 +48,54 @@ use App\Services\Util;
|
|||
* @method static \Illuminate\Database\Query\Builder|\App\Models\TravelUserBookingFewo withTrashed()
|
||||
* @method static \Illuminate\Database\Query\Builder|\App\Models\TravelUserBookingFewo withoutTrashed()
|
||||
* @mixin \Eloquent
|
||||
* @property int|null $fewo_reservation_id
|
||||
* @property float|null $price_balance
|
||||
* @property float|null $price_extra
|
||||
* @property float|null $price_travel_total
|
||||
* @property string|null $status_text
|
||||
* @property array|null $send_user_mail
|
||||
* @property array|null $send_service_mail
|
||||
* @property array|null $send_info_mail
|
||||
* @property array|null $send_employee_mail
|
||||
* @property string|null $info_mail_text
|
||||
* @property-read \App\Models\FewoReservation|null $fewo_reservation
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo whereAdults($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo whereBookingDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo whereChildren($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo whereDailyPrices($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo whereDeletedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo whereFewoLodgingId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo whereFewoReservationId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo whereFromDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo whereInfoMailText($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo whereInvoiceNumber($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo whereIsCalendarFewoDirect($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo whereIsCalendarHrs($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo whereIsCalendarSternTours($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo whereNotice($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo wherePersons($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo wherePriceBalance($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo wherePriceDeposit($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo wherePriceExtra($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo wherePriceService($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo wherePriceTotal($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo wherePriceTravel($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo wherePriceTravelTotal($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo whereSendEmployeeMail($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo whereSendInfoMail($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo whereSendServiceMail($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo whereSendUserMail($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo whereStatus($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo whereStatusText($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo whereToDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo whereTravelBookingFewoChannelId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo whereTravelUserId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelUserBookingFewo whereUpdatedAt($value)
|
||||
*/
|
||||
class TravelUserBookingFewo extends Model
|
||||
{
|
||||
|
|
@ -545,7 +593,7 @@ class TravelUserBookingFewo extends Model
|
|||
$company = $this->travel_user->company ? $this->travel_user->company ."\n" : "";
|
||||
$title = $this->travel_user->title ? $this->travel_user->title."\n" : "";
|
||||
$nationality = $this->travel_user->travel_nationality_id ? "\n".$this->travel_user->travel_nationality->name : "";
|
||||
return $company.$title.$this->travel_user->first_name." ".$this->travel_user->last_name."\n".$this->travel_user->street."\n".$this->travel_user->zip_code." ".$this->travel_user->city.$nationality;
|
||||
return $company.$title.$this->travel_user->first_name." ".$this->travel_user->last_name."\n".$this->travel_user->street."\n".$this->travel_user->zipcode." ".$this->travel_user->city.$nationality;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
|
@ -555,7 +603,7 @@ class TravelUserBookingFewo extends Model
|
|||
$name = trim($this->fewo_lodging->single_name).$sep;
|
||||
$address = trim($this->fewo_lodging->adress1);
|
||||
$address .= $this->fewo_lodging->adress2 ? " ".$this->fewo_lodging->adress2.$sep : ", ";
|
||||
$city = trim($this->fewo_lodging->zip_code)." ".trim($this->fewo_lodging->city);
|
||||
$city = trim($this->fewo_lodging->zipcode)." ".trim($this->fewo_lodging->city);
|
||||
return $name.$address.$city;
|
||||
}
|
||||
return "";
|
||||
|
|
|
|||
|
|
@ -9,6 +9,17 @@ use Illuminate\Database\Eloquent\Model;
|
|||
*
|
||||
* @property-read \App\User $user
|
||||
* @mixin \Eloquent
|
||||
* @property int $user_id
|
||||
* @property string $email
|
||||
* @property string $token
|
||||
* @property \Illuminate\Support\Carbon $created_at
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserUpdateEmail newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserUpdateEmail newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserUpdateEmail query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserUpdateEmail whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserUpdateEmail whereEmail($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserUpdateEmail whereToken($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\UserUpdateEmail whereUserId($value)
|
||||
*/
|
||||
class UserUpdateEmail extends Model
|
||||
{
|
||||
|
|
|
|||
103
app/Repositories/IQ/ContentSiteRepository.php
Normal file
103
app/Repositories/IQ/ContentSiteRepository.php
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
<?php
|
||||
|
||||
namespace App\Repositories\IQ;
|
||||
|
||||
|
||||
use App\Repositories\BaseRepository;
|
||||
|
||||
class ContentSiteRepository extends BaseRepository {
|
||||
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
//IQContentSite $model
|
||||
$this->model = false;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* refresh.
|
||||
*/
|
||||
public function update($data)
|
||||
{
|
||||
|
||||
/*
|
||||
if($data['user_id'] == "new"){
|
||||
|
||||
$this->model = User::create([
|
||||
'email' => $data['email'],
|
||||
'password' => env('APP_KEY'),
|
||||
]);
|
||||
}
|
||||
else{
|
||||
$this->model = $this->getById($data['user_id']);
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
public function siteFieldPrepare($contentSite, $area_section){
|
||||
|
||||
$ret = [];
|
||||
foreach($area_section->iq_content_model->iq_content_model_fields as $model_field){
|
||||
$site_field = false;
|
||||
// $site_field = IQContentSiteField::getSiteFieldOrNew($contentSite->id, $model_field->id);
|
||||
//new
|
||||
if(!$site_field->id){
|
||||
$site_field->site_id = $contentSite->id;
|
||||
$site_field->model_field_id = $model_field->id;
|
||||
$site_field->field = $model_field->field;
|
||||
$site_field->pos = $model_field->pos;
|
||||
$site_field->settings = $model_field->settings;
|
||||
$site_field->active = true;
|
||||
$site_field->search = $model_field->search;
|
||||
|
||||
}else{
|
||||
|
||||
}
|
||||
$ret[] = $site_field;
|
||||
}
|
||||
|
||||
$sort = [];
|
||||
foreach ($ret as $key => $site_field) {
|
||||
$sort[$key] = $site_field->pos;
|
||||
}
|
||||
array_multisort($sort, SORT_ASC, $ret);
|
||||
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
public function storeContentSideFields($contentFields){
|
||||
$pos = 0;
|
||||
foreach ($contentFields as $data){
|
||||
|
||||
$data['user_id'] = \Auth::user()->id;
|
||||
$data['active'] = isset($data['active']) ? true : false;
|
||||
$data['search'] = isset($data['search']) ? true : false;
|
||||
|
||||
$data['pos'] = $pos++;
|
||||
|
||||
if(isset($data['settings'])){
|
||||
$data['settings'] = json_decode($data['settings']);
|
||||
}
|
||||
|
||||
/*if($data['id'] == null || $data['id'] == 0){
|
||||
$site_field = IQContentSiteField::create($data);
|
||||
}else {
|
||||
$site_field = IQContentSiteField::find($data['id']);
|
||||
$site_field->fill($data);
|
||||
$site_field->save();
|
||||
}
|
||||
if(isset($data['content'])){
|
||||
$site_field->setContent($data['content']);
|
||||
$site_field->save();
|
||||
}*/
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
189
app/Services/HTMLTreeHelper.php
Normal file
189
app/Services/HTMLTreeHelper.php
Normal file
|
|
@ -0,0 +1,189 @@
|
|||
<?php
|
||||
namespace App\Services;
|
||||
|
||||
use App\Models\IQContentSiteField;
|
||||
use App\Models\IQContentTree;
|
||||
use App\Models\IQContentTreeNode;
|
||||
|
||||
class HTMLTreeHelper
|
||||
{
|
||||
|
||||
private static $uri = null;
|
||||
/**
|
||||
* @param $feature
|
||||
* @return string
|
||||
*/
|
||||
/*public static function makeAttrArray($array = array())
|
||||
{
|
||||
if(is_array($array)){
|
||||
return htmlspecialchars(json_encode($array), ENT_QUOTES, 'UTF-8');
|
||||
}
|
||||
return "";
|
||||
|
||||
}*/
|
||||
|
||||
|
||||
public static function makeNestableList(IQContentTree $iq_content_tree, $tree_node_id, $lvl = 0, $parent_id = false)
|
||||
{
|
||||
if ($parent_id) {
|
||||
//where('active', true)
|
||||
$tree_nodes = IQContentTreeNode::where('tree_id', $iq_content_tree->id)->where('lvl', $lvl)->where('parent_id', $parent_id)->orderBy('pos', 'ASC')->get();
|
||||
} else {
|
||||
$tree_nodes = IQContentTreeNode::where('tree_id', $iq_content_tree->id)->where('lvl', $lvl)->orderBy('pos', 'ASC')->get();
|
||||
}
|
||||
$out = "";
|
||||
foreach ($tree_nodes as $node) {
|
||||
$children = IQContentTreeNode::where('tree_id', $iq_content_tree->id)->where('lvl', $lvl + 1)->where('parent_id', $node->id)->count();
|
||||
|
||||
$out .= '<li class="dd-item dd-custom-drag-handle" data-id="' . $node->id . '">
|
||||
<div class="dd-handle">
|
||||
<span class="ion ion-md-expand text-secondary"></span>
|
||||
</div>
|
||||
<div class="dd-content">
|
||||
<a href="' . route('iq_content_tree_detail', [$iq_content_tree->id, $node->id]) . '">
|
||||
|
||||
<div class="dd-content-link">
|
||||
' . ($tree_node_id == $node->id ? '<strong> <i class="fa fa-chevron-right"></i> ' : '') . $node->name . ($tree_node_id == $node->id ? '</strong>' : '') . '
|
||||
</div>
|
||||
<div class="float-right">
|
||||
' . ($node->site_id ? '<span class="far fa-check fa-xs text-light"></span>' : '') . '
|
||||
<span class="far fa-edit"></span>
|
||||
' . ($node->active ? '<i class="fa fa-eye text-success"></i>' : '<i class="fa fa-eye-slash text-danger"></i>') . '
|
||||
</div>
|
||||
</a>
|
||||
</div>';
|
||||
|
||||
if ($children) {
|
||||
$out .= self::makeNestableList($iq_content_tree, $tree_node_id, $lvl + 1, $node->id);
|
||||
}
|
||||
$out .= '</li>';
|
||||
}
|
||||
return '<ol class="dd-list">' . $out . '</ol>';
|
||||
}
|
||||
|
||||
|
||||
public static function getUri()
|
||||
{
|
||||
if (strpos($_SERVER['REQUEST_URI'], "/") !== false) {
|
||||
$uri = explode("/", $_SERVER['REQUEST_URI']);
|
||||
$uri = array_filter($uri);
|
||||
return $uri;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public static function makeFrontendList(IQContentTree $iq_content_tree, $lvl = 0, $parent_id = false, $url = "", $categories = "")
|
||||
{
|
||||
|
||||
if (self::$uri === null) {
|
||||
self::$uri = self::getUri();
|
||||
}
|
||||
|
||||
$link = false;
|
||||
if (!empty(self::$uri[$lvl + 2])) {
|
||||
$link = (self::$uri[$lvl + 2]);
|
||||
}
|
||||
if ($parent_id) {
|
||||
//where('active', true)
|
||||
$tree_nodes = IQContentTreeNode::where('tree_id', $iq_content_tree->id)->where('lvl', $lvl)->where('active', true)->where('parent_id', $parent_id)->orderBy('pos', 'ASC')->get();
|
||||
} else {
|
||||
|
||||
$url = "/" . $iq_content_tree->identifier . "/";
|
||||
$tree_nodes = IQContentTreeNode::where('tree_id', $iq_content_tree->id)->where('lvl', $lvl)->where('active', true)->orderBy('pos', 'ASC')->get();
|
||||
}
|
||||
$out = "";
|
||||
$class = (!$link) ? 'active' : '';
|
||||
|
||||
foreach ($tree_nodes as $node) {
|
||||
|
||||
if($node->settings['show_in_navi'] == 'off'){
|
||||
continue;
|
||||
}
|
||||
$children = IQContentTreeNode::where('tree_id', $iq_content_tree->id)->where('lvl', $lvl + 1)->where('active', true)->where('parent_id', $node->id)->count();
|
||||
|
||||
$class = ($link == $node->identifier) ? 'active' : '';
|
||||
|
||||
if ($lvl == 0) {
|
||||
$out .= '<li class="nav-item mega-dropdown ' . $class . '">
|
||||
<a class="nav-link dropdown-toggle px-md-3 px-lg-4" href="' . url($url . $node->identifier) . '" data-toggle="mega-dropdown" data-trigger="hover">' . $node->name . '</a>
|
||||
<div class="dropdown-menu p-0 mt-2 overflow-hidden">
|
||||
<div class="row no-gutters row-bordered">
|
||||
<div class="col-12 p-4">
|
||||
<h6 class="small font-weight-bold text-expanded text-uppercase">'.$categories.'</h6>';
|
||||
} else {
|
||||
|
||||
$site_field = IQContentSiteField::findSiteField($node, 'main-navi', 'menu-navi-image');
|
||||
|
||||
$img_src = (isset($site_field->content) ? $site_field->content : '/images/navi_images-assets/titelbild.jpg');
|
||||
$out .= ' <a href="' .url($url . $node->identifier). '" class="media align-items-center ui-bordered text-body py-2 px-2 mb-2 img-thumbnail-shadow ' . $class . '">
|
||||
<img src="'.$img_src.'" alt="" class="d-block ui-w-60">
|
||||
<span class="media-body font-weight-semibold ml-2">' . ($link == $node->identifier ? '<strong>' : '') . $node->name . '</span>' . ($link == $node->identifier ? '</strong>' : '') . '
|
||||
</a>';
|
||||
}
|
||||
|
||||
if ($children && $lvl == 0) {
|
||||
$out .= self::makeFrontendList($iq_content_tree, $lvl + 1, $node->id, $url . $node->identifier . "/", $categories);
|
||||
|
||||
}
|
||||
if ($lvl == 0) {
|
||||
$out .= ' </div>
|
||||
</div>
|
||||
</div>
|
||||
</li>';
|
||||
}
|
||||
|
||||
}
|
||||
return $out;
|
||||
}
|
||||
|
||||
public static function makeFrontendListFooter(IQContentTree $iq_content_tree, $lvl = 0, $parent_id = false, $url = "")
|
||||
{
|
||||
|
||||
if (self::$uri === null) {
|
||||
self::$uri = self::getUri();
|
||||
}
|
||||
|
||||
$link = false;
|
||||
if (!empty(self::$uri[$lvl + 2])) {
|
||||
$link = (self::$uri[$lvl + 2]);
|
||||
}
|
||||
if ($parent_id) {
|
||||
//where('active', true)
|
||||
$tree_nodes = IQContentTreeNode::where('tree_id', $iq_content_tree->id)->where('lvl', $lvl)->where('active', true)->where('parent_id', $parent_id)->orderBy('pos', 'ASC')->get();
|
||||
} else {
|
||||
|
||||
$url = "/" . $iq_content_tree->identifier . "/";
|
||||
$tree_nodes = IQContentTreeNode::where('tree_id', $iq_content_tree->id)->where('lvl', $lvl)->where('active', true)->orderBy('pos', 'ASC')->get();
|
||||
}
|
||||
$out = "";
|
||||
$class = (!$link) ? 'active' : '';
|
||||
|
||||
foreach ($tree_nodes as $node) {
|
||||
if($node->settings['show_in_navi'] == 'off'){
|
||||
continue;
|
||||
}
|
||||
$children = IQContentTreeNode::where('tree_id', $iq_content_tree->id)->where('lvl', $lvl + 1)->where('active', true)->where('parent_id', $node->id)->count();
|
||||
|
||||
$class = ($link == $node->identifier) ? 'active' : '';
|
||||
|
||||
if ($lvl == 0) {
|
||||
$out .= '<div class="col-12 col-sm-3 col-md pb-4 border-left-white">
|
||||
<div class="footer-text small font-weight-bold mb-3 text-uppercase">' . $node->name . '</div>';
|
||||
} else {
|
||||
$out .= '<a href="' . url($url . $node->identifier) . '" class="footer-link d-block pb-2">' . ($link == $node->identifier ? '<strong>' : '') . $node->name . '</span>' . ($link == $node->identifier ? '</strong>' : '') . '</a>';
|
||||
}
|
||||
|
||||
if ($children && $lvl == 0) {
|
||||
$out .= self::makeFrontendListFooter($iq_content_tree, $lvl + 1, $node->id, $url . $node->identifier . "/");
|
||||
|
||||
}
|
||||
if ($lvl == 0) {
|
||||
$out .= '</div>';
|
||||
}
|
||||
|
||||
}
|
||||
return $out;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -67,6 +67,11 @@ use Laravel\Passport\HasApiTokens;
|
|||
* @method static \Illuminate\Database\Query\Builder|\App\User withoutTrashed()
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\Laravel\Passport\Client[] $clients
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\Laravel\Passport\Token[] $tokens
|
||||
* @property array|null $permissions
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\User newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\User newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\User query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\User wherePermissions($value)
|
||||
*/
|
||||
class User extends Authenticatable
|
||||
{
|
||||
|
|
|
|||
|
|
@ -15,4 +15,64 @@ if (! function_exists('make_v2_url')) {
|
|||
$path = trim($path, "/");
|
||||
return config('app.url_v2')."/".$path;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (! function_exists('array_to_json')) {
|
||||
function array_to_json($value)
|
||||
{
|
||||
return htmlspecialchars(json_encode($value));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (! function_exists('last_array_element')) {
|
||||
function last_array_element($value)
|
||||
{
|
||||
$e = explode("/", $value);
|
||||
if(is_array($e)){
|
||||
return end($e);
|
||||
}
|
||||
return $e;
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('pre_slug')) {
|
||||
function pre_slug($value)
|
||||
{
|
||||
return strtr($value, ["Ä" => "ae", "Ö" => "oe", "Ü" => "ue", "ä" => "ae", "ö" => "oe", "ü" => "ue", "ß"=>"ss"]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (! function_exists('get_active_badge')) {
|
||||
function get_active_badge($active)
|
||||
{
|
||||
return $active ? '<span class="badge badge-pill badge-success"><i class="far fa-check"></i></span>' : '<span class="badge badge-pill badge-danger"><i class="far fa-times"></i></span>';
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('get_switcher_input')) {
|
||||
function get_switcher_input($active = false, $name = "", $label = "")
|
||||
{
|
||||
return '<label class="switcher">
|
||||
<input type="checkbox" name="'.$name.'" class="switcher-input" '.($active ? 'checked="checked"' : '').'>
|
||||
<span class="switcher-indicator">
|
||||
<span class="switcher-yes"></span>
|
||||
<span class="switcher-no"></span>
|
||||
</span>
|
||||
<span class="switcher-label">'.$label.'</span>
|
||||
</label>';
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (! function_exists('get_file_last_time')) {
|
||||
function get_file_last_time($value)
|
||||
{
|
||||
if (file_exists($value)) {
|
||||
return filemtime($value);
|
||||
}
|
||||
return date("Ymd-i", time());
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue