protected function createModel(array $attributes = []) : Model
{
$model = new class extends Model implements Transformable
{
protected $fillable = ['name', 'price', 'is_rotten'];
protected $table = 'fruits';
public static function transformer() : string
{
return get_class(app('test.transformer'));
}
};
return $this->storeModel($model, $attributes);
}