Natinality, Country, Agenda, search Request. CMS
Magazine Content
This commit is contained in:
parent
30d5ca3b44
commit
aebfb0586a
72 changed files with 4636 additions and 590 deletions
|
|
@ -2,8 +2,88 @@
|
|||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* App\Models\Booking
|
||||
*
|
||||
* @property int $id
|
||||
* @property string|null $booking_date
|
||||
* @property int $customer_id
|
||||
* @property int|null $lead_id
|
||||
* @property int|null $new_drafts
|
||||
* @property int $sf_guard_user_id
|
||||
* @property int $branch_id
|
||||
* @property float|null $service_fee
|
||||
* @property int|null $travel_country_id
|
||||
* @property int|null $travel_category_id
|
||||
* @property int|null $pax
|
||||
* @property int|null $coupon_id
|
||||
* @property \Illuminate\Support\Carbon $created_at
|
||||
* @property \Illuminate\Support\Carbon $updated_at
|
||||
* @property string|null $title
|
||||
* @property string|null $start_date
|
||||
* @property string|null $end_date
|
||||
* @property int|null $website_id
|
||||
* @property string|null $travel_number
|
||||
* @property string|null $participant_name
|
||||
* @property string|null $participant_firstname
|
||||
* @property string|null $participant_birthdate
|
||||
* @property int|null $participant_salutation_id
|
||||
* @property string|null $ev_number
|
||||
* @property string|null $merlin_knr
|
||||
* @property string|null $merlin_order_number
|
||||
* @property int|null $travel_company_id
|
||||
* @property int|null $travel_documents
|
||||
* @property float|null $price
|
||||
* @property float|null $price_total
|
||||
* @property float|null $deposit_total
|
||||
* @property float|null $final_payment
|
||||
* @property string|null $final_payment_date
|
||||
* @property int|null $travelagenda_id
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Sym\Arrangement[] $arrangements
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\BookingDraftItem[] $booking_draft_items
|
||||
* @property-read \App\Models\TravelCountry|null $lead
|
||||
* @property-read \App\Models\SfGuardUser $sf_guard_user
|
||||
* @property-read \App\Models\TravelAgenda|null $travel_agenda
|
||||
* @property-read \App\Models\TravelCountry|null $travel_country
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereBookingDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereBranchId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereCouponId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereCustomerId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereDepositTotal($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereEndDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereEvNumber($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereFinalPayment($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereFinalPaymentDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereLeadId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereMerlinKnr($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereMerlinOrderNumber($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereNewDrafts($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereParticipantBirthdate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereParticipantFirstname($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereParticipantName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereParticipantSalutationId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking wherePax($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking wherePrice($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking wherePriceTotal($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereServiceFee($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereSfGuardUserId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereStartDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereTitle($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereTravelCategoryId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereTravelCompanyId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereTravelCountryId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereTravelDocuments($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereTravelNumber($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereTravelagendaId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Booking whereWebsiteId($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class Booking extends Model
|
||||
{
|
||||
protected $connection = 'mysql';
|
||||
|
|
@ -19,6 +99,34 @@ class Booking extends Model
|
|||
return $this->hasMany('App\Models\BookingDraftItem', 'booking_id', 'id')->orderBy('pos', 'ASC');
|
||||
}
|
||||
|
||||
//on crm
|
||||
public function travel_agenda()
|
||||
{
|
||||
return $this->belongsTo('App\Models\TravelAgenda', 'travelagenda_id', 'id');
|
||||
}
|
||||
|
||||
public function travel_country()
|
||||
{
|
||||
return $this->belongsTo('App\Models\TravelCountry', 'travel_country_id', 'crm_id');
|
||||
}
|
||||
|
||||
public function lead()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Lead', 'lead_id', 'id');
|
||||
}
|
||||
|
||||
public function sf_guard_user()
|
||||
{
|
||||
return $this->belongsTo('App\Models\SfGuardUser', 'sf_guard_user_id', 'id');
|
||||
}
|
||||
|
||||
public function arrangements()
|
||||
{
|
||||
return $this->hasMany('App\Models\Sym\Arrangement', 'booking_id', 'id')->orderBy('view_position', 'DESC');
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
public function findBeforeDraftItemRelation($reid)
|
||||
{
|
||||
|
|
@ -46,4 +154,14 @@ class Booking extends Model
|
|||
return false;
|
||||
}
|
||||
|
||||
public function getStartDateFormat(){
|
||||
if(!$this->attributes['start_date']){ return ""; }
|
||||
return Carbon::parse($this->attributes['start_date'])->format(\Util::formatDateDB());
|
||||
}
|
||||
|
||||
public function getEndDateFormat(){
|
||||
if(!$this->attributes['end_date']){ return ""; }
|
||||
return Carbon::parse($this->attributes['end_date'])->format(\Util::formatDateDB());
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,6 +55,11 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingDraftItem whereTravelProgramId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\BookingDraftItem whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
* @property int|null $fewo_lodging_id
|
||||
* @property float|null $price
|
||||
* @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)
|
||||
*/
|
||||
class BookingDraftItem extends Model
|
||||
{
|
||||
|
|
|
|||
115
app/Models/CMSContent.php
Normal file
115
app/Models/CMSContent.php
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Cviebrock\EloquentSluggable\Sluggable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* App\Models\CMSContent
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property string $slug
|
||||
* @property string $field
|
||||
* @property string|null $text
|
||||
* @property string|null $full_text
|
||||
* @property int|null $integer
|
||||
* @property float|null $decimal
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent findSimilarSlugs($attribute, $config, $slug)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent whereDecimal($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent whereField($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent whereFullText($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent whereInteger($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent whereSlug($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent whereText($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\CMSContent whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class CMSContent extends Model
|
||||
{
|
||||
|
||||
use Sluggable;
|
||||
|
||||
|
||||
protected static $fields = [
|
||||
'text' => 'Text (190 Zeichen)',
|
||||
'full_text' => 'Full Text (50K Zeichen)',
|
||||
'integer' => 'Zahl (10 Stellen)',
|
||||
'decimal' => 'Kommazahl (10,2 Stellen)',
|
||||
];
|
||||
|
||||
protected $connection = 'mysql_stern';
|
||||
protected $table = 'c_m_s_contents';
|
||||
|
||||
protected $fillable = [
|
||||
'name', 'field', 'text', 'full_text', 'integer', 'decimal',
|
||||
];
|
||||
|
||||
public function sluggable()
|
||||
{
|
||||
return [
|
||||
'slug' => [
|
||||
'source' => 'name'
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
public static function getFieldsOptions($setKey = false){
|
||||
$options = self::$fields;
|
||||
$ret = "";
|
||||
foreach ($options as $key => $option){
|
||||
$attr = ($key == $setKey) ? 'selected="selected"' : '';
|
||||
$ret .= '<option value="'.$key.'" '.$attr.'>'.$option.'</option>\n';
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
|
||||
public function getFieldName(){
|
||||
return isset(self::$fields[$this->field]) ? self::$fields[$this->field] : '';
|
||||
}
|
||||
|
||||
public function getPreviewContent(){
|
||||
|
||||
$content = $this->{$this->field};
|
||||
if(strlen($content) > 40){
|
||||
return substr($content, 0, 40)." ...";
|
||||
}
|
||||
return $content;
|
||||
}
|
||||
|
||||
|
||||
public function _format_number($value){
|
||||
return preg_replace("/[^0-9,]/", "", $value);
|
||||
}
|
||||
|
||||
public function setDecimalAttribute($value)
|
||||
{
|
||||
$value = $this->_format_number($value);
|
||||
$value = substr($value, -13);
|
||||
$this->attributes['decimal'] = floatval(str_replace(',', '.', $value));
|
||||
}
|
||||
|
||||
public function getDecimalAttribute()
|
||||
{
|
||||
if(isset($this->attributes['decimal'])){
|
||||
// 2 = decimal places | '.' = decimal seperator | ',' = thousand seperator
|
||||
return number_format(($this->attributes['decimal']), 2, ',', '.');
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public function setIntegerAttribute($value)
|
||||
{
|
||||
$value = $this->_format_number($value);
|
||||
$value = substr($value, -10);
|
||||
$this->attributes['integer'] = intval($value);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
@ -44,6 +44,8 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @mixin \Eloquent
|
||||
* @property string|null $service
|
||||
* @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)
|
||||
*/
|
||||
class DraftItem extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\DraftType whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
* @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)
|
||||
*/
|
||||
class DraftType extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5,6 +5,97 @@ namespace App\Models;
|
|||
use Carbon\Carbon;
|
||||
use HTMLHelper;
|
||||
|
||||
/**
|
||||
* App\Models\Feedback
|
||||
*
|
||||
* @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|null $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 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
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Feedback[] $children
|
||||
* @property-read \App\Models\Feedback|null $parent
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereBoxBody($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereBoxDiscount($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereBoxImageUrl($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereBoxStar($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereBumaDestination($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereBumaGjr($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereCanonicalUrl($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereCatalogId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereCatalogIndex($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereCmsSettings($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereContent($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereContentNew($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereCountryId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereDescription($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereFewoLodging($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereKeyword($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereKeywords($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereLft($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereLvl($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereModel($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereOLDCatalogID($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereOLDOwnerID($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereOrder($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereOwner($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereOwnerSecond($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback wherePagetitle($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereParentId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback wherePriceTags($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereRealUrlPath($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereRgt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereShowInNavi($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereSlug($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereStatus($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereTemplate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereTextRight($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereTitle($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereTravelProgram($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereTreeRoot($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Feedback whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class Feedback extends Page
|
||||
{
|
||||
protected $table = 'page';
|
||||
|
|
|
|||
81
app/Models/Lead.php
Normal file
81
app/Models/Lead.php
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* App\Models\Lead
|
||||
*
|
||||
* @property int $id
|
||||
* @property int $customer_id
|
||||
* @property string $request_date
|
||||
* @property string|null $travelperiod_start
|
||||
* @property string|null $travelperiod_end
|
||||
* @property int|null $travelperiod_length
|
||||
* @property int|null $travelcountry_id
|
||||
* @property int|null $travelagenda_id
|
||||
* @property string|null $remarks
|
||||
* @property int $sf_guard_user_id
|
||||
* @property int|null $is_closed
|
||||
* @property int|null $initialcontacttype_id
|
||||
* @property int|null $searchengine_id
|
||||
* @property string|null $searchengine_keywords
|
||||
* @property int $status_id
|
||||
* @property string|null $next_due_date
|
||||
* @property int|null $website_id
|
||||
* @property int|null $travelcategory_id
|
||||
* @property \Illuminate\Support\Carbon $created_at
|
||||
* @property \Illuminate\Support\Carbon $updated_at
|
||||
* @property float|null $price
|
||||
* @property int|null $pax
|
||||
* @property string|null $participant_name
|
||||
* @property string|null $participant_firstname
|
||||
* @property string|null $participant_birthdate
|
||||
* @property int|null $participant_salutation_id
|
||||
* @property-read \App\Models\SfGuardUser $sf_guard_user
|
||||
* @property-read \App\Models\Status $status
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereCustomerId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereInitialcontacttypeId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereIsClosed($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereNextDueDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereParticipantBirthdate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereParticipantFirstname($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereParticipantName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereParticipantSalutationId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead wherePax($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead wherePrice($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereRemarks($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereRequestDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereSearchengineId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereSearchengineKeywords($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereSfGuardUserId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereStatusId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereTravelagendaId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereTravelcategoryId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereTravelcountryId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereTravelperiodEnd($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereTravelperiodLength($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereTravelperiodStart($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Lead whereWebsiteId($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class Lead extends Model
|
||||
{
|
||||
protected $connection = 'mysql';
|
||||
|
||||
protected $table = 'lead';
|
||||
|
||||
public function status()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Status', 'status_id', 'id');
|
||||
}
|
||||
|
||||
public function sf_guard_user()
|
||||
{
|
||||
return $this->belongsTo('App\Models\SfGuardUser', 'sf_guard_user_id', 'id');
|
||||
}
|
||||
}
|
||||
|
|
@ -4,6 +4,95 @@ namespace App\Models;
|
|||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* App\Models\Page
|
||||
*
|
||||
* @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|null $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 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\Page whereBoxBody($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereBoxDiscount($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereBoxImageUrl($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereBoxStar($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereBumaDestination($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereBumaGjr($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereCanonicalUrl($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereCatalogId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereCatalogIndex($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereCmsSettings($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereContent($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereContentNew($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereCountryId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereDate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereDescription($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereFewoLodging($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereKeyword($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereKeywords($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereLft($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereLvl($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereModel($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereOLDCatalogID($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereOLDOwnerID($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereOrder($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereOwner($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereOwnerSecond($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page wherePagetitle($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereParentId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page wherePriceTags($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereRealUrlPath($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereRgt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereShowInNavi($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereSlug($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereStatus($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereTemplate($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereTextRight($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereTitle($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereTravelProgram($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereTreeRoot($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Page whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class Page extends Model
|
||||
{
|
||||
protected $connection = 'mysql_stern';
|
||||
|
|
|
|||
|
|
@ -4,6 +4,29 @@ namespace App\Models;
|
|||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* App\Models\SidebarWidget
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property string|null $component
|
||||
* @property string|null $html
|
||||
* @property array|null $show_at
|
||||
* @property int|null $pos
|
||||
* @property int $active
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\SidebarWidget whereActive($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\SidebarWidget whereComponent($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\SidebarWidget whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\SidebarWidget whereHtml($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\SidebarWidget whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\SidebarWidget whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\SidebarWidget wherePos($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\SidebarWidget whereShowAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\SidebarWidget whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class SidebarWidget extends Model
|
||||
{
|
||||
|
||||
|
|
|
|||
31
app/Models/Status.php
Normal file
31
app/Models/Status.php
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* App\Models\Status
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property int $handling_days
|
||||
* @property string|null $color
|
||||
* @property-read \App\Models\Status $status
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Status whereColor($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Status whereHandlingDays($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Status whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Status whereName($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class Status extends Model
|
||||
{
|
||||
protected $connection = 'mysql';
|
||||
|
||||
protected $table = 'status';
|
||||
|
||||
public function status()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Status', 'status_id', 'id');
|
||||
}
|
||||
}
|
||||
|
|
@ -34,6 +34,8 @@ use Illuminate\Database\Eloquent\Model;
|
|||
*/
|
||||
class Arrangement extends Model
|
||||
{
|
||||
protected $connection = 'mysql';
|
||||
|
||||
protected $table = 'arrangement';
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,8 @@ use Illuminate\Database\Eloquent\Model;
|
|||
*/
|
||||
class ArrangementTemplate extends Model
|
||||
{
|
||||
protected $connection = 'mysql';
|
||||
|
||||
protected $table = 'arrangement_template';
|
||||
|
||||
public function arrangements()
|
||||
|
|
|
|||
39
app/Models/Sym/TravelCountry.php
Normal file
39
app/Models/Sym/TravelCountry.php
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models\Sym;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
|
||||
/**
|
||||
* App\Models\Sym\TravelCountry
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property int|null $is_customer_country
|
||||
* @property int|null $active_backend
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\TravelCountry whereActiveBackend($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\TravelCountry whereId($value)
|
||||
* @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
|
||||
*/
|
||||
class TravelCountry extends Model
|
||||
{
|
||||
|
||||
protected $connection = 'mysql';
|
||||
|
||||
protected $table = 'travel_country';
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'is_customer_country',
|
||||
'active_backend'
|
||||
|
||||
];
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
|
||||
|
||||
}
|
||||
50
app/Models/TravelAgenda.php
Normal file
50
app/Models/TravelAgenda.php
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* App\Models\TravelAgenda
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property int|null $travelcountry_id
|
||||
* @property int|null $active
|
||||
* @property-read \App\Models\TravelCountry|null $travel_country
|
||||
* @property-read \App\Models\Sym\TravelCountry|null $travel_country_crm
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelAgenda whereActive($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelAgenda whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelAgenda whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelAgenda whereTravelcountryId($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class TravelAgenda extends Model
|
||||
{
|
||||
protected $connection = 'mysql';
|
||||
|
||||
protected $table = 'travel_agenda';
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'travelcountry_id',
|
||||
'active'
|
||||
|
||||
];
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
//on crm
|
||||
public function travel_country_crm()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Sym\TravelCountry', 'travelcountry_id', 'id');
|
||||
}
|
||||
|
||||
|
||||
//on stern other DB
|
||||
public function travel_country()
|
||||
{
|
||||
return $this->belongsTo('App\Models\TravelCountry', 'travelcountry_id', 'crm_id');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -4,6 +4,36 @@ namespace App\Models;
|
|||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* App\Models\TravelCountry
|
||||
*
|
||||
* @property int $id
|
||||
* @property int|null $crm_id
|
||||
* @property string $name
|
||||
* @property string|null $html_information
|
||||
* @property string|null $entry_requirements
|
||||
* @property int|null $feedback_page_id
|
||||
* @property int|null $is_customer_country
|
||||
* @property int|null $active_frontend
|
||||
* @property int|null $active_backend
|
||||
* @property string|null $updated_at
|
||||
* @property string|null $created_at
|
||||
* @property-read \App\Models\Page|null $feedback_page
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\TravelNationalityRequirement[] $travel_nationality_requirements
|
||||
* @property-read \App\Models\TravelProgramCountry $travel_program_country
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereActiveBackend($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereActiveFrontend($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereCrmId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereEntryRequirements($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereFeedbackPageId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereHtmlInformation($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereIsCustomerCountry($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelCountry whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class TravelCountry extends Model
|
||||
{
|
||||
//use the connection to sec. Datebase sterntours
|
||||
|
|
@ -15,6 +45,11 @@ class TravelCountry extends Model
|
|||
protected $fillable = [
|
||||
'name',
|
||||
'html_information',
|
||||
'entry_requirements',
|
||||
'is_customer_country',
|
||||
'active_frontend',
|
||||
'active_backend'
|
||||
|
||||
];
|
||||
|
||||
public $timestamps = false;
|
||||
|
|
@ -23,4 +58,40 @@ class TravelCountry extends Model
|
|||
{
|
||||
return $this->hasOne('App\Models\TravelProgramCountry', 'country_id', 'id');
|
||||
}
|
||||
}
|
||||
|
||||
public function feedback_page()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Page', 'feedback_page_id', 'id');
|
||||
}
|
||||
|
||||
public function travel_nationality_requirements()
|
||||
{
|
||||
return $this->hasMany('App\Models\TravelNationalityRequirement', 'travel_country_id', 'id');
|
||||
}
|
||||
|
||||
|
||||
public function getNationalityRequirement($travel_nationality_id){
|
||||
|
||||
$model = TravelNationalityRequirement::where('travel_country_id', $this->id)->where('travel_nationality_id', $travel_nationality_id)->first();
|
||||
if($model){
|
||||
return $model->text;
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public function setNationalityRequirement($travel_nationality_id, $text){
|
||||
$model = TravelNationalityRequirement::where('travel_country_id', $this->id)->where('travel_nationality_id', $travel_nationality_id)->first();
|
||||
if($model){
|
||||
$model->text = $text;
|
||||
$model->save();
|
||||
}else{
|
||||
$data = [
|
||||
'travel_country_id' => $this->id,
|
||||
'travel_nationality_id' => $travel_nationality_id,
|
||||
'text' => $text,
|
||||
];
|
||||
TravelNationalityRequirement::create($data);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
}
|
||||
85
app/Models/TravelMagazine.php
Normal file
85
app/Models/TravelMagazine.php
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Cviebrock\EloquentSluggable\Sluggable;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* App\Models\TravelMagazine
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property string $slug
|
||||
* @property string|null $text
|
||||
* @property string|null $full_text
|
||||
* @property string|null $meta_title
|
||||
* @property string|null $meta_description
|
||||
* @property string|null $meta_keywords
|
||||
* @property int|null $pos
|
||||
* @property int $scope
|
||||
* @property int $active
|
||||
* @property \Illuminate\Support\Carbon|null $created_at
|
||||
* @property \Illuminate\Support\Carbon|null $updated_at
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelMagazine findSimilarSlugs($attribute, $config, $slug)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelMagazine whereActive($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelMagazine whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelMagazine whereFullText($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelMagazine whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelMagazine whereMetaDescription($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelMagazine whereMetaKeywords($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelMagazine whereMetaTitle($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelMagazine whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelMagazine wherePos($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelMagazine whereScope($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelMagazine whereSlug($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelMagazine whereText($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelMagazine whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class TravelMagazine extends Model
|
||||
{
|
||||
|
||||
use Sluggable;
|
||||
|
||||
|
||||
//use the connection to sec. Datebase sterntours
|
||||
protected $connection = 'mysql_stern';
|
||||
|
||||
protected $table = 'travel_magazines';
|
||||
|
||||
|
||||
protected static $scopes = [
|
||||
0 => 'Kurze Version',
|
||||
1 => 'Lange Version',
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'name', 'slug', 'text', 'full_text', 'meta_title', 'meta_description', 'meta_keywords', 'pos', 'scope', 'active',
|
||||
];
|
||||
|
||||
public function sluggable()
|
||||
{
|
||||
return [
|
||||
'slug' => [
|
||||
'source' => 'name'
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
public static function getScopeOptions($setKey = false){
|
||||
$options = self::$scopes;
|
||||
$ret = "";
|
||||
foreach ($options as $key => $option){
|
||||
$attr = ($key == $setKey) ? 'selected="selected"' : '';
|
||||
$ret .= '<option value="'.$key.'" '.$attr.'>'.$option.'</option>\n';
|
||||
}
|
||||
return $ret;
|
||||
}
|
||||
public function getScopeName($key = 0){
|
||||
return isset(self::$scopes[$key]) ? self::$scopes[$key] : '';
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
33
app/Models/TravelNationality.php
Normal file
33
app/Models/TravelNationality.php
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* App\Models\TravelNationality
|
||||
*
|
||||
* @property int $id
|
||||
* @property string|null $name
|
||||
* @property int|null $active
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelNationality whereActive($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelNationality whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelNationality whereName($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class TravelNationality extends Model
|
||||
{
|
||||
//use the connection to sec. Datebase sterntours
|
||||
protected $connection = 'mysql_stern';
|
||||
|
||||
protected $table = 'travel_nationality';
|
||||
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'active',
|
||||
];
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
}
|
||||
49
app/Models/TravelNationalityRequirement.php
Normal file
49
app/Models/TravelNationalityRequirement.php
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* App\Models\TravelNationalityRequirement
|
||||
*
|
||||
* @property int $id
|
||||
* @property int|null $travel_country_id
|
||||
* @property int|null $travel_nationality_id
|
||||
* @property string|null $text
|
||||
* @property-read \App\Models\TravelCountry|null $travel_country
|
||||
* @property-read \App\Models\TravelNationality|null $travel_nationality
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelNationalityRequirement whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelNationalityRequirement whereText($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelNationalityRequirement whereTravelCountryId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelNationalityRequirement whereTravelNationalityId($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class TravelNationalityRequirement extends Model
|
||||
{
|
||||
//use the connection to sec. Datebase sterntours
|
||||
protected $connection = 'mysql_stern';
|
||||
|
||||
protected $table = 'travel_nationality_requirement';
|
||||
|
||||
|
||||
protected $fillable = [
|
||||
'travel_country_id',
|
||||
'travel_nationality_id',
|
||||
'text',
|
||||
];
|
||||
|
||||
public $timestamps = false;
|
||||
|
||||
|
||||
public function travel_country()
|
||||
{
|
||||
return $this->belongsTo('App\Models\TravelCountry', 'travel_country_id');
|
||||
}
|
||||
|
||||
public function travel_nationality()
|
||||
{
|
||||
return $this->belongsTo('App\Models\TravelNationality', 'travel_nationality_id');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -103,6 +103,9 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelProgram whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelProgram whereUpdatedAt($value)
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\TravelProgramDraft[] $travel_program_drafts
|
||||
* @property int|null $insurance_4
|
||||
* @property-read \App\Models\TravelProgramCountry $travel_program_country
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelProgram whereInsurance4($value)
|
||||
*/
|
||||
class TravelProgram extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2,8 +2,20 @@
|
|||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* App\Models\TravelProgramCountry
|
||||
*
|
||||
* @property int|null $program_id
|
||||
* @property int|null $country_id
|
||||
* @property-read \App\Models\TravelCountry|null $travel_country
|
||||
* @property-read \App\Models\TravelProgram|null $travel_program
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelProgramCountry whereCountryId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\TravelProgramCountry whereProgramId($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class TravelProgramCountry extends Model
|
||||
{
|
||||
//use the connection to sec. Datebase sterntours
|
||||
|
|
@ -28,4 +40,5 @@ class TravelProgramCountry extends Model
|
|||
{
|
||||
return $this->belongsTo('App\Models\TravelCountry', 'country_id');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue