【发布时间】:2020-01-16 15:52:07
【问题描述】:
在 MySQL 数据库中,我使用 tinyint(1),因此 validate 字段将是 0 或 1。 如何在下面编辑此推力以使其能够显示 True 或 False 而不是 0 或 1?
namespace App\Thrust;
use BadChoice\Thrust\Resource;
use BadChoice\Thrust\Fields\Link;
use BadChoice\Thrust\Fields\Text;
use BadChoice\Thrust\Fields\Email;
use BadChoice\Thrust\Fields\Gravatar;
class Requester extends Resource
{
public static $model = \App\Requester::class;
public static $search = ['name', 'email'];
public static $defaultSort = 'tickets_count';
public static $defaultOrder = 'DESC';
public function fields()
{
return [
Text::make('validate', 'Validate'),
];
}
}
【问题讨论】: