devisephp/cms

Some fields not working on model editor

Closed this issue · 2 comments

Not sure which ones don't work but here are some of the fields we were having a tough time saving on a model.

  • Textarea
  • WYSIWYG

Table: posts
Fields: title[varchar], description [TEXT]
Model Mapping:

 'App\Call' =>
        [
            'rules' =>
                [
                    'details' => 'required',
                    'title' => 'required',
                ],

            'picks' =>
                [
                    'Title' => ['title' => 'text'],
                    'Details' => ['details' => 'image'],
                ],

            'types' =>
                [
                    'Title' => 'text',
                    'Details' => 'image',
                ],
        ],
<?php $call3 = $calls[0]?>
    <div data-devise="$call3, Edit Call Details">
        {{ $call3->details }} detaial
    </div>

This was a configuration issue. I have updated the docs to be more clear how model mapping should be configured.