FileManager
This commit is contained in:
parent
c8948338bb
commit
f1e0900a7a
131 changed files with 5844 additions and 3081 deletions
31
app/Models/CMSAuthor.php
Normal file
31
app/Models/CMSAuthor.php
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Reliese\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class CMSAuthor
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property Carbon $created_at
|
||||
* @property Carbon $updated_at
|
||||
*
|
||||
* @package App\Models
|
||||
*/
|
||||
class CMSAuthor extends Model
|
||||
{
|
||||
protected $connection = 'mysql_stern';
|
||||
|
||||
protected $table = 'c_m_s_authors';
|
||||
|
||||
protected $fillable = [
|
||||
'name'
|
||||
];
|
||||
}
|
||||
|
|
@ -122,6 +122,12 @@ class IQContentTreeNode extends Model
|
|||
}
|
||||
}
|
||||
|
||||
public function getUrl(){
|
||||
|
||||
|
||||
return config('app.url_stern')."/".$this->getUri();
|
||||
}
|
||||
|
||||
public function getUri(){
|
||||
|
||||
$root = $this->iq_content_tree->identifier."/";
|
||||
|
|
|
|||
31
app/Models/Keyword.php
Normal file
31
app/Models/Keyword.php
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Reliese\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class Keyword
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property Carbon $created_at
|
||||
* @property Carbon $updated_at
|
||||
*
|
||||
* @package App\Models
|
||||
*/
|
||||
class Keyword extends Model
|
||||
{
|
||||
protected $connection = 'mysql_stern';
|
||||
|
||||
protected $table = 'keywords';
|
||||
|
||||
protected $fillable = [
|
||||
'name'
|
||||
];
|
||||
}
|
||||
|
|
@ -90,6 +90,7 @@ use Reliese\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
|
||||
* @property-read \App\Models\Sym\TravelCountry|null $travel_country_crm
|
||||
*/
|
||||
class Lead extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@ use Illuminate\Database\Eloquent\Model;
|
|||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\TravelCountry whereContactText4($value)
|
||||
* @property array|null $contact_lands
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\Sym\TravelCountry whereContactLands($value)
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|\App\Models\Booking[] $bookings
|
||||
* @property-read int|null $bookings_count
|
||||
*/
|
||||
class TravelCountry extends Model
|
||||
{
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ class TravelGuide extends Model
|
|||
];
|
||||
|
||||
protected $fillable = [
|
||||
'name', 'slug', 'text', 'full_text', 'keyword', 'meta_title', 'meta_description', 'meta_keywords', 'country_id', 'box_image_url', 'pos', 'scope', 'active',
|
||||
'name', 'slug', 'text', 'full_text', 'author_id', 'keyword', 'meta_title', 'meta_description', 'meta_keywords', 'country_id', 'box_image_url', 'pos', 'scope', 'active',
|
||||
];
|
||||
|
||||
|
||||
|
|
@ -93,8 +93,13 @@ class TravelGuide extends Model
|
|||
return $iq_content_site->iq_content_tree_node;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public function author()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Author', 'author_id', 'id');
|
||||
}
|
||||
|
||||
public static function getScopeOptions($setKey = false){
|
||||
$options = self::$scopes;
|
||||
|
|
|
|||
|
|
@ -124,6 +124,7 @@ class TravelProgram extends Model
|
|||
'subtitle',
|
||||
'program_code',
|
||||
'weekdays',
|
||||
'keywords',
|
||||
'status',
|
||||
];
|
||||
|
||||
|
|
@ -142,6 +143,12 @@ class TravelProgram extends Model
|
|||
return $this->hasOne('App\Models\TravelProgramCountry', 'program_id', 'id');
|
||||
}
|
||||
|
||||
public function hasTravelProgramDrafts (){
|
||||
if($this->travel_program_drafts->count()){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
public function getWeekdaysArray(){
|
||||
if($this->weekdays){
|
||||
return explode(',', $this->weekdays);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue