Add all files
This commit is contained in:
42
extensions/Others/CustomPages/Models/Page.php
Normal file
42
extensions/Others/CustomPages/Models/Page.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace Paymenter\Extensions\Others\CustomPages\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class Page extends Model
|
||||
{
|
||||
protected $table = 'ext_custompages_pages';
|
||||
|
||||
protected $fillable = [
|
||||
'is_active',
|
||||
'expires_at',
|
||||
'title',
|
||||
'slug',
|
||||
'content',
|
||||
'visibility',
|
||||
'visible_in_menu',
|
||||
|
||||
// metadata
|
||||
'meta_title',
|
||||
'meta_description',
|
||||
'meta_image',
|
||||
'meta_color',
|
||||
'meta_favicon',
|
||||
];
|
||||
|
||||
protected $casts = [
|
||||
'visible_in_menu' => 'boolean',
|
||||
'is_active' => 'boolean',
|
||||
];
|
||||
|
||||
public function getRouteKeyName()
|
||||
{
|
||||
return 'slug';
|
||||
}
|
||||
|
||||
public function views()
|
||||
{
|
||||
return $this->hasMany(PageView::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user