Skip to content

Array to string conversion #11

@espositodaniele

Description

@espositodaniele

Hello,

First of all thanks for this package.
I've correctly installed the package but I had same error on save. Every time I try to save I'm having this error:

Array to string conversion
vendor/laravel/framework/src/Illuminate/Support/Str.php#488

I would also ask some more information to get correctly working this field. Here is the code:

Unlayer::make('Design')->config([
      'projectId' => config('unlayer.project_id'),
  ])
  ->savingCallback(function (NovaRequest $request, $attribute, Campaign $newsletterModel, $htmlFieldName) {
      $newsletterModel->content = $request->input($htmlFieldName);
  }),

config('unlayer.project_id') where it get the config?
What should I do to save correctly the config design ?

I've created a field on my table with json type to save the design as you illustrate on the docs, and also a content field to save html code.

Thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions