WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content
Discussion options

You must be logged in to vote

I resolved this, it was due to a function I was calling in the controller for my module failing.

So for the record, I am using transformIndexItems() to create a new alias column in the listing page for this module which is a truncated version of an answer field which normally contains long values. I now use the Laravel Str::limit() to truncate the actual answer field and all is fine.

protected function transformIndexItems($items){
      foreach ($items as $item) {
          // copy simplification
          $item->answer_alias='<span class="font12">'.\Str::limit(strip_tags($item->answer),250).'</span>';
      }
      return $items;
  }

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by adam-jones-net
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant