We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I save a Bard field the contents of the field in the edit screen is still json.
config\runway.php
'resources' => [ \App\Models\MyModel::class => [ 'name' => 'My Model', 'hidden' => true, // 'icon' => '', 'blueprint' => [ 'sections' => [ 'main' => [ 'fields' => [ [ 'handle' => 'title', 'field' => [ 'type' => 'text', 'validate' => 'required', ], ], [ 'handle' => 'body', 'field' => [ 'type' => 'markdown', 'validate' => '', ], ], [ 'handle' => 'images', 'field' => [ 'type' => 'assets', 'container' => 'assets', 'validate' => '', ], ], [ 'handle' => 'bard_content', 'field' => [ 'always_show_set_button' => false, 'buttons' => [ 'h2', 'h3', 'bold', 'italic', 'unorderedlist', 'orderedlist', 'removeformat', 'quote', 'anchor', 'image', 'table', ], 'save_html' => false, 'toolbar_mode' => 'fixed', 'link_noopener' => false, 'link_noreferrer' => false, 'target_blank' => false, 'reading_time' => false, 'fullscreen' => true, 'allow_source' => true, 'enable_input_rules' => true, 'enable_paste_rules' => true, 'display' => 'Standard Bard Field', 'type' => 'bard', 'icon' => 'bard', 'listable' => 'hidden', ], ], ], ], ], ], 'listing' => [ 'columns' => [ 'title', ], 'sort' => [ 'column' => 'title', 'direction' => 'asc', ], ] ],
database\migrations\2021_06_26_211029_create_my_models_table.php
Schema::create('my_models', function (Blueprint $table) { $table->id(); $table->string('title'); $table->string('body')->nullable(); $table->json('images')->nullable(); $table->json('bard_content')->nullable(); $table->timestamps(); });
app\Models\MyModel.php
<?php namespace App\Models; use Illuminate\Database\Eloquent\Factories\HasFactory; use Illuminate\Database\Eloquent\Model; class MyModel extends Model { use HasFactory; // protected $guarded = []; protected $casts = [ 'bard_content' => 'json', ]; }
Statamic 3.1.26 Solo Laravel 8.48.2 PHP 7.4.19 doublethreedigital/runway 2.0.5
The text was updated successfully, but these errors were encountered:
Thanks, I'll take a look this evening.
Sorry, something went wrong.
64f57a5
No branches or pull requests
Description
When I save a Bard field the contents of the field in the edit screen is still json.
Steps to reproduce
config\runway.php
database\migrations\2021_06_26_211029_create_my_models_table.php
app\Models\MyModel.php
Environment
Statamic 3.1.26 Solo
Laravel 8.48.2
PHP 7.4.19
doublethreedigital/runway 2.0.5
The text was updated successfully, but these errors were encountered: