How to add fields which are not available in database?

Viewed 185

I am not able to add field which is not available in my database

I have tried adding

$this->crud->addFields([
    [
        'name'        => 'coupon_type',
        'label' => 'Coupon For',
        'type'        => 'select_from_array',
        'options'     => [ 
            // Options
        ],
        'allows_null' => true,
        'default' => 1,
        'attributes' => [
            'id' => 'coupon_type'
        ]
    ]
]);

I want to add fields in my create page.

1 Answers
Related