Admin panel php framework

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

php framework agnostic admin panel

oversoul/admin-panel

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

Readme.md

framework agnostic admin panel.

trying to make it as minimal as possible. it allows you to create multiple pages with different types (table, form). without intervening much with your code base.

ps: you still need to setup your routes, the authentication etc.

We allow multiple type of responses, as a default we used php views, but we figured for laravel users as an example, would use blade instead, so one possible solution is to create a different Renderer .

For now we have two default Renderers :

  • DefaultRenderer this just returns an array as output
  • JsonRenderer this returns json output

To create a Renderer make it extends Aecodes\AdminPanel\Responses\Renderer . then add it to config.

Currently supported Layouts

  • Table (Takes array of TD, every TD can be custom rendered)
  • Form (Takes array of Fields)
  • Div (the only use case is to have customized wrappers)
  • It’s possible to create your own widgets.

ps: widgets implements Widget interface.

Currently supported Form fields

  • Input (text, password, email, number, . )
  • Radio
  • Select
  • Textarea
  • Checkbox
  • Image (upload single image)
  1. install with composer
  2. create a config file using config/panel.php as a starting point.
  3. create (singleton) instance of Dashboard class, make sure to pass the config as an array.
$config = require './config/panel.php'; Aecodes\AdminPanel\Dashboard::setup($config);

How to create an admin page

  1. create a new class extending the Panel class
  2. for convenience set the properties for both $name & $description of the panel (visible on the page).
  3. create a query method that returns the array of data.
function query(): array < // get data from database. return Page::all()->toArray(); >
function render(): array < return [ Table::make([ // (label, name) both are optional TD::make('#', 'id'), // it's also possible to use Table::column Table::column('Title', 'title'), ]) // . ]; >
function render(): array < return [ Form::make([ Input::make('title')->title('Title'), // form submit Action::button('Save'), ]) ->action('#') ->method('post'), // . ]; >
  1. to finish up, in the callback of your route, just return a new instance of the class you created.
// callback for some route public function index() < // PagesTable extends Panel return (new Response(new PagesTable))->render(); >

when extending the Panel class you can specify the $layout property.

this doesn’t ship with a view layer. you can use the default (soon) views packages.

return [ // current renderer. 'renderer' => 'default', // add new renderer here. 'renderers' => [ 'json' => Aecodes\AdminPanel\Responses\JsonRenderer::class, 'default' => Aecodes\AdminPanel\Responses\DefaultRenderer::class, ], // default classes for button and a tag. 'classes' => [ 'link' => '', 'button' => '', ], // global menus, can be and array or callback 'menu' => function () < return []; >, // input old value. 'old_value' => function ($name, $default) < return $default; >, // global errors (i.e: validation errors) 'errors' => function () < return []; > ];

About

php framework agnostic admin panel

Источник

MV — PHP framework
for fast development

MV tracker

  • Website content management with CMF
  • Object-oriented approach and MVC principles
  • Auto-generated Admin Panel
  • ORM and ready-to-use functional blocks ( sorting , filtering , etc.)
  • Visual editor, images bulk upload and much more

Quick review

Work process starts with creation of Model — PHP class for managing SQL table. Fields of the model have different data types based on principles of web development.

class Articles extends Model < protected $name = "Articles"; protected $model_elements = array( array("Activation", "bool", "active", array("on_create" =>true)), array("Name", "char", "name", array("required" => true)), array("Date", "date", "date", array("required" => true)), array("Content", "text", "content", array("rich_text" => true)), array("Images", "multi_images", "images") ); >

After PHP class and SQL table are ready, an interface becomes available in Admin Panel. You can create, edit, delete records, and also you will get a sidebar with filters to help you search particular records in long data list.

Selecting of template for requested URL is accomplished by Routing.

To show model’s data on the webpage a template file is being created.

 

date); ?>

name; ?>

content; ?>
articles -> displayGallery($article -> images); ?>

In MV framework templates generation is made by PHP itself to guarantee high speed of template processing and page generation. Record object based on ORM principles helps to link model’s functions with template of a web page.

Main idea of MV is to provide a simplified and faster way to create websites and applications with the help of built-in CMF that allows to manage content in Admin Panel .

MV tracker

MV tracker is based on open source MV framework
License

Источник

MV — PHP framework
для быстрой разработки

MV tracker

Объектно-ориентированный PHP framework с
административной панелью

Admin panel MV

Основные преимущества работы MV framework:

  • Управление контентом сайта посредством CMF.
  • Объектно-ориентированный подход и принципы MVC.
  • Автоматическая генерация административной панели.
  • Быстрое добавление и изменение модулей.
  • ORM и готовые функциональные блоки (сортировка, фильтрация и пр.).
  • Визуальный редактор, пакетная загрузка изображений и многое другое.

Краткий обзор MV фреймворк

Процесс работы на framework PHP начинается с создания модели — PHP класса для управления SQL таблицей. Поля моделей имеют различные типы данных, основанные на принципах веб разработки.

class Articles extends Model < protected $name = "Статьи"; protected $model_elements = array( array("Активация", "bool", "active", array("on_create" =>true)), array("Название", "char", "name", array("required" => true)), array("Дата", "date", "date", array("required" => true)), array("Содержание", "text", "content", array("rich_text" => true)), array("Изображения", "multi_images", "images") ); >

После создания класса и SQL таблицы в административной панели становится доступным интерфейс для создания, редактирования и удаления записей, а также формируется колонка с фильтрами для поиска нужных записей по всем полям.

Привязка шаблона к URL осуществляется при помощи маршрутизации.

Для отображения данных модели на странице сайта создается файл шаблона.

 

date); ?>

name; ?>

content; ?>
articles -> displayGallery($article -> images); ?>

Шаблонизация в PHP framework MV происходит при помощи самого PHP, что обеспечивает высокую скорость обработки шаблона и генерации страниц в целом. В шаблонах вызываются методы моделей, а также извлекаются поля из базы данных при помощи объекта Record, который отвечает за организацию ORM.

Основная идея MV framework — упростить и ускорить создание сайтов и веб-приложений при помощи встроенного CMF, позволяющего управлять контентом через панель администратора.

Источник

Admin Panel

MV tracker

To go through authorization the user must enter login and password. After 2 failed attempts to enter a correct data, an additional CAPTCHA code will be required to pass. On the main page you can see list of modules, search bar, administrators manager, recycle bin, history of operations and filemanager icons. The rights and limitations for each administrator are defined individually.

All the records of any regular model are located in one general table, where on the right you can will see a column for filtering required records. The fields list and its order in general table can be configured. Filters can be hidden. You may apply bulk operations to edit or delete many records at one time. For each record there is a change history with an ability to rollback to the previous version of its content.

When deleting a record, initially it will be placed into recycle bin, after that you can finally delete it. You can empty recycle bin and remove all deleted records at the same time. Also, there are users operations history with an option to search by date, name and other parameters.

Источник

Читайте также:  Javascript not first child
Оцените статью