Add 'plugi-core/' from commit '6c478c54d048ab2fd5af4e8e79074153fb594c16'

git-subtree-dir: plugi-core
git-subtree-mainline: d4c734cdbd
git-subtree-split: 6c478c54d0
This commit is contained in:
Paul Spenke
2023-06-13 07:27:11 +08:00
151 changed files with 46689 additions and 0 deletions
BIN
View File
Binary file not shown.
+180
View File
@@ -0,0 +1,180 @@
<?php
return [
/*
|--------------------------------------------------------------------------
| General settings
|--------------------------------------------------------------------------
|
| General settings for configuring the PageBuilder.
| If you install phpb with Composer, general.assets_url line must be:
| 'assets_url' => '/vendor/hansschouten/plugi/dist',
|
*/
'general' => [
'base_url' => 'http://localhost',
'language' => 'en',
'assets_url' => '/assets',
'uploads_url' => '/uploads'
],
/*
|--------------------------------------------------------------------------
| Storage settings
|--------------------------------------------------------------------------
|
| Database and file storage settings.
|
*/
'storage' => [
'use_database' => true,
'database' => [
'driver' => 'mysql',
'host' => 'localhost',
'database' => '',
'username' => '',
'password' => '',
'charset' => 'utf8',
'collation' => 'utf8_unicode_ci',
'prefix' => '',
],
'uploads_folder' => __DIR__ . '/uploads'
],
/*
|--------------------------------------------------------------------------
| Auth settings
|--------------------------------------------------------------------------
|
| By default an authentication class is provided which checks for the
| credentials configured in this setting block.
|
*/
'auth' => [
'use_login' => true,
'class' => Plugi\Modules\Auth\Auth::class,
'url' => '/admin/auth',
'username' => 'admin',
'password' => 'changethispassword'
],
/*
|--------------------------------------------------------------------------
| WebsiteManager settings
|--------------------------------------------------------------------------
|
| By default a basic WebsiteManager is provided for creating/editing pages.
|
*/
'website_manager' => [
'use_website_manager' => true,
'class' => Plugi\Modules\WebsiteManager\WebsiteManager::class,
'url' => '/admin'
],
/*
|--------------------------------------------------------------------------
| Website settings
|--------------------------------------------------------------------------
|
| By default a setting class is provided for accessing website settings.
|
*/
'setting' => [
'class' => Plugi\Setting::class
],
/*
|--------------------------------------------------------------------------
| PageBuilder settings
|--------------------------------------------------------------------------
|
| By default a PageBuilder is provided based on GrapesJS.
|
*/
'pagebuilder' => [
'class' => Plugi\Modules\GrapesJS\PageBuilder::class,
'url' => '/admin/pagebuilder',
'actions' => [
'back' => '/admin'
]
],
/*
|--------------------------------------------------------------------------
| Page settings
|--------------------------------------------------------------------------
|
| By default a Page class is provided with knowledge about its layout and URL.
|
*/
'page' => [
'class' => Plugi\Page::class,
'table' => 'pages',
'translation' => [
'class' => Plugi\PageTranslation::class,
'table' => 'page_translations',
'foreign_key' => 'page_id',
]
],
/*
|--------------------------------------------------------------------------
| Cache settings
|--------------------------------------------------------------------------
|
| Faster load time by skipping block parsing if the page has been requested before.
| A page will be cached, except if it contains a block with caching set to false.
| This can be used to prevent caching pages with content that varies per page load.
| The cached html is removed if the page is saved again in the page builder.
|
*/
'cache' => [
'enabled' => false,
'folder' => __DIR__ . '/cache',
'class' => Plugi\Cache::class
],
/*
|--------------------------------------------------------------------------
| Theme settings
|--------------------------------------------------------------------------
|
| PageBuilder requires a themes folder in which for each theme the individual
| theme blocks are defined. A theme block is a sub folder in the themes folder
| containing a view, model (optional) and controller (optional).
|
*/
'theme' => [
'class' => Plugi\Theme::class,
'folder' => __DIR__ . '/themes',
'folder_url' => '/themes',
'active_theme' => 'demo'
],
/*
|--------------------------------------------------------------------------
| Routing settings
|--------------------------------------------------------------------------
|
| Settings for resolving pages based on the current URI.
|
*/
'router' => [
'class' => Plugi\Modules\Router\DatabasePageRouter::class
],
/*
|--------------------------------------------------------------------------
| Class replacements
|--------------------------------------------------------------------------
|
| Allows mapping a class namespace to an alternative namespace,
| useful for replacing implementations of specific pagebuilder classes.
| Example: Plugi\UploadedFile::class => Alternative\UploadedFile::class
| Important: when overriding a class always extend the original class.
|
*/
'class_replacements' => [
],
];
+208
View File
@@ -0,0 +1,208 @@
-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: mysql
-- Erstellungszeit: 05. Jun 2023 um 09:11
-- Server-Version: 8.0.31
-- PHP-Version: 8.2.6
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Datenbank: `plugi`
--
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `menus`
--
CREATE TABLE `menus` (
`id` int NOT NULL,
`name` varchar(50) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
`pages` mediumtext CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
--
-- Daten für Tabelle `menus`
--
INSERT INTO `menus` (`id`, `name`, `pages`) VALUES
(1, 'Main', '1,3'),
(2, 'Footer', '1');
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `pages`
--
CREATE TABLE `pages` (
`id` int NOT NULL,
`name` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
`layout` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
`data` longtext CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci,
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
--
-- Daten für Tabelle `pages`
--
INSERT INTO `pages` (`id`, `name`, `layout`, `data`, `updated_at`, `created_at`) VALUES
(1, 'Home', 'master', NULL, '2023-06-05 07:10:09', '2023-06-05 07:10:09'),
(2, 'Sitemap', 'sitemap', NULL, '2023-06-05 07:11:15', '2023-06-05 07:10:41'),
(3, 'About', 'master', NULL, '2023-06-05 07:10:57', '2023-06-05 07:10:57');
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `page_translations`
--
CREATE TABLE `page_translations` (
`id` int NOT NULL,
`page_id` int NOT NULL,
`locale` varchar(50) NOT NULL,
`title` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
`meta_title` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
`meta_description` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
`route` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_unicode_ci NOT NULL,
`updated_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
--
-- Daten für Tabelle `page_translations`
--
INSERT INTO `page_translations` (`id`, `page_id`, `locale`, `title`, `meta_title`, `meta_description`, `route`, `updated_at`, `created_at`) VALUES
(1, 1, 'de', 'Home', 'Home', 'Home', '/', '2023-06-05 07:10:09', '2023-06-05 07:10:09'),
(2, 2, 'de', 'Sitemap', '', '', '/sitemap.xml', '2023-06-05 07:10:41', '2023-06-05 07:10:41'),
(3, 3, 'de', 'About', 'About', 'Description', '/about', '2023-06-05 07:10:57', '2023-06-05 07:10:57');
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `settings`
--
CREATE TABLE `settings` (
`id` int NOT NULL,
`setting` varchar(50) NOT NULL,
`value` mediumtext NOT NULL,
`is_array` tinyint(1) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
-- --------------------------------------------------------
--
-- Tabellenstruktur für Tabelle `uploads`
--
CREATE TABLE `uploads` (
`id` int NOT NULL,
`public_id` varchar(50) NOT NULL,
`original_file` varchar(512) NOT NULL,
`mime_type` varchar(50) NOT NULL,
`server_file` varchar(512) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;
--
-- Indizes der exportierten Tabellen
--
--
-- Indizes für die Tabelle `menus`
--
ALTER TABLE `menus`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `menu` (`name`);
--
-- Indizes für die Tabelle `pages`
--
ALTER TABLE `pages`
ADD PRIMARY KEY (`id`);
--
-- Indizes für die Tabelle `page_translations`
--
ALTER TABLE `page_translations`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `page_id` (`page_id`,`locale`);
--
-- Indizes für die Tabelle `settings`
--
ALTER TABLE `settings`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `setting` (`setting`);
--
-- Indizes für die Tabelle `uploads`
--
ALTER TABLE `uploads`
ADD PRIMARY KEY (`id`),
ADD UNIQUE KEY `public_id` (`public_id`),
ADD UNIQUE KEY `server_file` (`server_file`);
--
-- AUTO_INCREMENT für exportierte Tabellen
--
--
-- AUTO_INCREMENT für Tabelle `menus`
--
ALTER TABLE `menus`
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT für Tabelle `pages`
--
ALTER TABLE `pages`
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT für Tabelle `page_translations`
--
ALTER TABLE `page_translations`
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT für Tabelle `settings`
--
ALTER TABLE `settings`
MODIFY `id` int NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT für Tabelle `uploads`
--
ALTER TABLE `uploads`
MODIFY `id` int NOT NULL AUTO_INCREMENT;
--
-- Constraints der exportierten Tabellen
--
--
-- Constraints der Tabelle `page_translations`
--
ALTER TABLE `page_translations`
ADD CONSTRAINT `page_translations_ibfk_1` FOREIGN KEY (`page_id`) REFERENCES `pages` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;