Travel Guide Frontend Backend
This commit is contained in:
parent
e6cc042aee
commit
0857a34766
681 changed files with 6680 additions and 1689 deletions
77
app/Models/IQContentCategory.php
Normal file
77
app/Models/IQContentCategory.php
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
<?php
|
||||
|
||||
/**
|
||||
* Created by Reliese Model.
|
||||
*/
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Carbon\Carbon;
|
||||
use Cviebrock\EloquentSluggable\Sluggable;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* Class IQContentCategory
|
||||
*
|
||||
* @property int $id
|
||||
* @property string $name
|
||||
* @property string $slug
|
||||
* @property string $identifier
|
||||
* @property int $pos
|
||||
* @property bool $active
|
||||
* @property Carbon $created_at
|
||||
* @property Carbon $updated_at
|
||||
* @property Collection|IQContentTag[] $i_q_content_tags
|
||||
* @package App\Models
|
||||
* @property-read int|null $i_q_content_tags_count
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentCategory findSimilarSlugs($attribute, $config, $slug)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentCategory newModelQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentCategory newQuery()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentCategory query()
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentCategory whereActive($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentCategory whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentCategory whereId($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentCategory whereIdentifier($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentCategory whereName($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentCategory wherePos($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentCategory whereSlug($value)
|
||||
* @method static \Illuminate\Database\Eloquent\Builder|\App\Models\IQContentCategory whereUpdatedAt($value)
|
||||
* @mixin \Eloquent
|
||||
*/
|
||||
class IQContentCategory extends Model
|
||||
{
|
||||
use Sluggable;
|
||||
|
||||
protected $connection = 'mysql_stern';
|
||||
|
||||
protected $table = 'i_q_content_categories';
|
||||
|
||||
protected $casts = [
|
||||
'pos' => 'int',
|
||||
'active' => 'bool'
|
||||
];
|
||||
|
||||
protected $fillable = [
|
||||
'name',
|
||||
'slug',
|
||||
'identifier',
|
||||
'pos',
|
||||
'active'
|
||||
];
|
||||
|
||||
|
||||
public function sluggable()
|
||||
{
|
||||
return [
|
||||
'slug' => [
|
||||
'source' => 'name'
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
public function i_q_content_tags()
|
||||
{
|
||||
return $this->hasMany(IQContentTag::class, 'category_id');
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue