Your own content
What a site looks like is configuration, not code. Everything here goes in config/manager.php.
Pages with fields
'pages' => ['definitions' => ['home' => ['title' => 'Home', 'fields' => [
'hero_title' => ['label' => 'Title on the photo', 'type' => 'text', 'default' => 'Welcome'],
'intro' => ['label' => 'Story', 'type' => 'markdown'],
'photo' => ['label' => 'Photo', 'type' => 'media'],
]]]],
The public site reads IriksIT\Manager\Models\Page::contentFor('home'): the stored values over the defaults. Types: text, textarea,
markdown, lines, media, url, number, date, toggle, select. The screens make the form, the server validates by type.
A page without a definition is a free page with one Markdown text.
Lists without code
manager.resources turns a definition into a menu item, list, form, validation and the rights <list>.view and <list>.manage
(menu, socials, services, testimonials, leads). The records live in a model of the site (model) or in the package's own table.
Screens of your own
A JavaScript module in manager.extensions is loaded before the manager starts. window.IriksManager gives Vue, api, boot, t,
flash, navigate, register and the components Link, FormFields, Icon, MediaPicker; register('^/leads$', Component, { data: true })
shows a screen. Build your bundle with vue external: the manager points import 'vue' at its own Vue.
The menu and the simple view
Items can have a section, an icon and an order, and the site adds links of its own (manager.menu). simple_view adds the rights
manager.full and manager.switch and a simple face with only the items marked simple.
Existing data and names
route_name,table_prefixandtablesmove the package out of the way of what the site already has.manager:doctorwarns about shared names.php artisan manager:import posts --table=articles --map=title=headline --dry-runcopies the rows of a table of the site intoposts,pagesorreviews. The source is only read; running it again updates what it made.
For the public pages
<x-manager::pulse /> counts the page in the statistics (no cookies; honours Do Not Track).