Professional searchable page library.
* Clear Live, Draft and Homepage indicators.
* Direct Edit page, Edit content and View page actions.
* Page editor divided into:
* Page details
* SEO and URL
* Publishing
* Automatic, unique URL slugs.
* Publish and expiry scheduling.
* Page templates: Default, Landing and Full Width.
* Homepage replacement handled automatically.
* Current homepage protected from accidental deletion.
* Page duplication includes its complete content structure.
* Content composer now works from the actual page record and page ID.
* Clearer section-based terminology for editors.
* Reusable content remains available as an advanced content library rather than dominating the workflow.
The package contains the eight complete changed files, preserving their project paths. It is not a patch collection.
This commit is contained in:
@@ -4,7 +4,9 @@ namespace Modules\Pages\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use Illuminate\Database\Eloquent\SoftDeletes;
|
||||
use Modules\Content\Models\PageContent;
|
||||
use Modules\Localization\Concerns\HasTranslations;
|
||||
use Modules\Sites\Concerns\BelongsToSites;
|
||||
use Modules\Workflow\Concerns\HasWorkflow;
|
||||
@@ -15,13 +17,19 @@ final class Page extends Model
|
||||
|
||||
protected $table = 'pages';
|
||||
|
||||
protected $fillable = ['title', 'slug', 'summary', 'content', 'status', 'published_at', 'is_home'];
|
||||
protected $fillable = ['title', 'slug', 'summary', 'content', 'status', 'published_at', 'expires_at', 'template', 'is_home'];
|
||||
|
||||
protected function casts(): array
|
||||
{
|
||||
return [
|
||||
'published_at' => 'datetime',
|
||||
'expires_at' => 'datetime',
|
||||
'is_home' => 'boolean',
|
||||
];
|
||||
}
|
||||
|
||||
public function contentPlacements(): HasMany
|
||||
{
|
||||
return $this->hasMany(PageContent::class)->orderBy('region')->orderBy('sort_order');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user