PHP code example of liberusoftware / module-cms-content-types

1. Go to this page and download the library: Download liberusoftware/module-cms-content-types 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/ */

    

liberusoftware / module-cms-content-types example snippets


$type = ContentType::create([
    'key' => 'portfolio', 'name' => 'Portfolio',
    'singular_label' => 'Item', 'plural_label' => 'Items',
    'fields' => [
        ['name' => 'summary', 'label' => 'Summary', 'type' => 'text', '=> $type->id, 'title' => 'A project', 'data' => $data]);
$entry->publish();