PHP code example of dominservice / laravel-cms
1. Go to this page and download the library: Download dominservice/laravel-cms library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
dominservice / laravel-cms example snippets
'admin' => [
'components' => [
'content_index' => \App\Livewire\Cms\ContentIndex::class,
'content_form' => \App\Livewire\Cms\ContentForm::class,
'category_index' => \App\Livewire\Cms\CategoryIndex::class,
'category_form' => \App\Livewire\Cms\CategoryForm::class,
'settings_dashboard' => \App\Livewire\Cms\SettingsDashboard::class,
],
],
'types' => [
'content' => \App\Enums\CmsContentType::class,
'category' => \App\Enums\CmsCategoryType::class,
],
'admin' => [
'content' => [
'schema_presets' => [
'cta' => [
'cta_label' => [
'type' => 'text',
'translatable' => true,
],
'cta_url' => 'url',
],
],
'sections' => [
'home' => [
'label' => 'Home',
'blocks' => [
'hero' => [
'type' => 'block',
'schema_presets' => ['cta'],
'schema_fields' => [
'eyebrow' => [
'translatable' => true,
' 'value' => ['
'admin' => [
'content' => [
'media_picker' => [
'enabled' => true,
'browse_route' => 'admin.media.index',
'label' => 'Biblioteka mediów',
'helper' => 'Wybierz istniejący asset z biblioteki lub wgraj nowy plik.',
],
],
],
'admin' => [
'content' => [
'editorjs' => [
'profiles' => [
'default' => [
'tools' => ['paragraph', 'header', 'list', 'quote'],
],
'compact' => [
'tools' => ['paragraph', 'list'],
],
],
'field_profiles' => [
'description' => 'default',
'faq_items.answer' => 'compact',
],
],
],
],
bash
php artisan vendor:publish --provider="Dominservice\LaravelCms\ServiceProvider" --tag=views
php artisan vendor:publish --provider="Dominservice\LaravelCms\ServiceProvider" --tag=lang