#Count chars field not working

3 messages · Page 1 of 1 (latest)

wet pagoda
#

I want to create a column that shows the length of the field title:

 TextColumn::make('Title')
      ->formatStateUsing(function ($record) {
          $length = strlen($record->title);
          return "<b>{$length}</b> /" . LENGTH_TITLE;
      })
      ->html(),
scarlet shard
wet pagoda
#

Thanks!