2017 © Pedro Peláez
 

library laravel-cms-models

Laravel CMS: Main Models Module Generator

image

czim/laravel-cms-models

Laravel CMS: Main Models Module Generator

  • Friday, June 22, 2018
  • by czim
  • Repository
  • 2 Watchers
  • 5 Stars
  • 1,147 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 3 Forks
  • 9 Open issues
  • 50 Versions
  • 30 % Grown

The README.md

Latest Version on Packagist ![Software License][ico-license] Build Status Coverage Status, (*1)

CMS for Laravel - Main Models Module

This module offers the means to edit Eloquent models through the Laravel CMS., (*2)

Features:, (*3)

  • Model listings
  • Edit forms for creating and updating model records
  • Elaborate (optional) module configuration and customization.
    • Customizable listing columns, scopes, filters, sorting, etc.
    • Customizable edit form html, fields, validation rules, create vs. edit forms, etc.
    • Customizable model references, display labels, etc.
  • Support for Translatable models
  • Support for Listify'd models, with drag/drop reordering
  • Support for nested child-parent listings and breadcrumb trails

To be used to with the Laravel CMS Core., (*4)

For a better end-user experience when using file uploads, installing the Laravel CMS Upload Module is recommended., (*5)

Version Compatibility

Laravel Package
5.3 1.3
5.4 1.4
5.5 1.5
5.6 1.6
5.7 1.7

Changelog

View the changelog., (*6)

Installation

Add the module class to your cms-modules.php configuration file:, (*7)

``` php 'modules' => [ // ... Czim\CmsModels\Modules\ModelModuleGenerator::class, ],, (*8)


Add the service provider to your `cms-modules.php` configuration file: ``` php 'providers' => [ // ... Czim\CmsModels\Providers\CmsModelsServiceProvider::class, // ... ],

To publish the config:, (*9)

bash php artisan vendor:publish, (*10)

Configuration

Models may be added with basic functionality by simply registering them in the cms-models config, or special CMS model configuration files may be created for them to customize them as needed., (*11)

Adding and Configuring Models

To register models with the CMS module, you can either:, (*12)

  • Add their full class name to the cms-models.models config array:, (*13)

    <?php
          'models' => [
              App\Models\YourModel::class,
          ],
    
  • Create a model configuration file for them in the configured directory.
    By default, this is in the app/Cms/Models/ directory; this is defined under the cms-models.collector.source.dir key., (*14)

For more details about customizing how models are configured, see the documentation on Model Configuration., (*15)

Troubleshooting

If you run into problems, please consult the CMS core troubleshooting section., (*16)

Further information

Contributing

Please see CONTRIBUTING for details., (*17)

Credits

License

The MIT License (MIT). Please see License File for more information., (*18)

The Versions