Skip to content
Open
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
23a5491
feat: adding pages and sections resource with test and other things
Aug 1, 2025
236f929
reverting User workbench
Aug 1, 2025
d7de82a
fix: remove unnecessary enums sections
Aug 1, 2025
40cc2fe
refactor: implement feedback and clean up tests
Aug 8, 2025
9366788
refactor: remove redundant code and standardize test naming
Aug 10, 2025
3567d7b
refactor: remove redundant code and standardize test naming
Aug 10, 2025
e1d0861
Merge branch 'main' of github.com:thapacodes4u/eclipsephp-cms-plugin …
Aug 23, 2025
b84cbc2
feat: implement pages and sections with tenant scoping & navigation
Sep 3, 2025
a2590b6
Refactor: Using right URL for dynamic section & Page filtering accord…
Sep 3, 2025
e492285
Refactor: renaming the query string & also adding it to the create ac…
Sep 3, 2025
cc92be7
Fixing: SQL error when creating new page
Sep 3, 2025
a05dd92
feat: separate pages and sections management with improved navigation
Sep 30, 2025
02a769e
refactor: improve seeder and remove unnecessary view permissions
Sep 30, 2025
6960fb7
fix: section filter now persists when toggling columns
Sep 30, 2025
ce6a370
Resolving conflict
Oct 8, 2025
c6abc1c
fix: resolving conflict & fixing failing tests
thapacodes4u Oct 16, 2025
dc0a915
fix: failing test
thapacodes4u Oct 16, 2025
0a2382f
fix: reduce section seeding, add WYSIWYG to short description, allow …
thapacodes4u Nov 10, 2025
63915cc
Merge branch 'main' into feat/pages-and-sections
thapacodes4u Nov 12, 2025
88e1d21
refactor: update translatable property format in Section model
SlimDeluxe Mar 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,10 @@
"datalinx/php-utils": "^2.5",
"eclipsephp/common": "dev-main",
"filament/filament": "^3.3",
"spatie/laravel-package-tools": "^1.19"
"filament/spatie-laravel-translatable-plugin": "^3.3",
"solution-forest/filament-tree": "^2.1",
"spatie/laravel-package-tools": "^1.19",
"spatie/laravel-translatable": "^6.11"
},
"require-dev": {
"laravel/pint": "^1.21",
Expand Down
6 changes: 3 additions & 3 deletions config/eclipse-cms.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
|--------------------------------------------------------------------------
*/
'tenancy' => [
'enabled' => false,
'model' => null,
'foreign_key' => null,
'enabled' => true,
'model' => 'Eclipse\\Core\\Models\\Site',
'foreign_key' => 'site_id',
Comment thread
SlimDeluxe marked this conversation as resolved.
Outdated
],
];
33 changes: 0 additions & 33 deletions database/factories/PageFactory.php
Comment thread
SlimDeluxe marked this conversation as resolved.

This file was deleted.

32 changes: 0 additions & 32 deletions database/factories/SectionFactory.php

This file was deleted.

15 changes: 9 additions & 6 deletions database/migrations/2025_07_22_082135_create_sections_table.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,15 @@ public function up(): void

if (config('eclipse-cms.tenancy.enabled')) {
$tenantClass = config('eclipse-cms.tenancy.model');
/** @var \Illuminate\Database\Eloquent\Model $tenant */
$tenant = new $tenantClass;
$table->foreignId(config('eclipse-cms.tenancy.foreign_key'))
->constrained($tenant->getTable(), $tenant->getKeyName())
->cascadeOnUpdate()
->cascadeOnDelete();
if (class_exists($tenantClass)) {
$tenant = new $tenantClass;
$table->foreignId(config('eclipse-cms.tenancy.foreign_key'))
->constrained($tenant->getTable(), $tenant->getKeyName())
->cascadeOnUpdate()
->cascadeOnDelete();
} else {
$table->unsignedBigInteger(config('eclipse-cms.tenancy.foreign_key'))->nullable();
Comment thread
SlimDeluxe marked this conversation as resolved.
Outdated
}
}

$table->string('name');
Expand Down
29 changes: 26 additions & 3 deletions database/seeders/CmsSeeder.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,38 @@

namespace Eclipse\Cms\Seeders;

use Eclipse\Cms\Models\Page;
use Eclipse\Cms\Models\Section;
use Eclipse\Core\Models\Site;
use Illuminate\Database\Seeder;

class CmsSeeder extends Seeder
{
public function run(): void
{
Section::factory()
->count(3)
->create();
$sites = Site::all();

if ($sites->isEmpty()) {
$sites = collect([Site::factory()->create()]);
}
Comment thread
SlimDeluxe marked this conversation as resolved.
Outdated

foreach ($sites as $site) {
$sections = Section::factory()
->count(3)
->forSite($site)
->create([
'name' => [
'en' => 'Information',
'sl' => 'Informacije',
],
]);

$sections->each(function (Section $section) {
Page::factory()
->count(3)
->forSection($section)
->create();
});
}
}
}
129 changes: 0 additions & 129 deletions src/Admin/Filament/Resources/PageResource.php

This file was deleted.

23 changes: 0 additions & 23 deletions src/Admin/Filament/Resources/PageResource/Pages/EditPage.php
Comment thread
SlimDeluxe marked this conversation as resolved.

This file was deleted.

Loading
Loading