First setup: module registry, switchable modules, permissions

This commit is contained in:
Matthijs Iriks committed 2026-12-04 01:18:14 +01:00
commit 936c794597
52 files changed
+1304

No files matched your search

+11
View File
@@ -0,0 +1,11 @@
<?php
namespace IriksIT\Manager\Models;
class Group extends Model
{
protected function casts(): array
{
return ['permissions' => 'array'];
}
}
+11
View File
@@ -0,0 +1,11 @@
<?php
namespace IriksIT\Manager\Models;
class Media extends Model
{
public function getTable(): string
{
return config('manager.table_prefix').'media';
}
}
+16
View File
@@ -0,0 +1,16 @@
<?php
namespace IriksIT\Manager\Models;
use Illuminate\Database\Eloquent\Model as Eloquent;
/** Base of the package models: tables get the configured prefix, e.g. manager_pages. */
abstract class Model extends Eloquent
{
protected $guarded = [];
public function getTable(): string
{
return $this->table ?? config('manager.table_prefix').parent::getTable();
}
}
+5
View File
@@ -0,0 +1,5 @@
<?php
namespace IriksIT\Manager\Models;
class Page extends Model {}
+5
View File
@@ -0,0 +1,5 @@
<?php
namespace IriksIT\Manager\Models;
class Post extends Model {}
+5
View File
@@ -0,0 +1,5 @@
<?php
namespace IriksIT\Manager\Models;
class Review extends Model {}