*/ public static function getValidations() { return [ 'enabled' => "nullable|boolean", 'delete_coupon_on_expires' => 'nullable|boolean', 'delete_coupon_on_uses_reached' => 'nullable|boolean', 'max_uses_per_user' => 'nullable|integer', ]; } /** * Summary of optionInputData array * Only used for the settings page * @return array>> */ public static function getOptionInputData() { return [ "category_icon" => "fas fa-ticket-alt", 'enabled' => [ 'label' => 'Enable Coupons', 'type' => 'boolean', 'description' => 'Enables coupons to be used in the store.' ], 'delete_coupon_on_expires' => [ 'label' => 'Auto Delete Expired Coupons', 'type' => 'boolean', 'description' => 'Automatically deletes the coupon if it expires.' ], 'delete_coupon_on_uses_reached' => [ 'label' => 'Delete Coupon When Max Uses Reached', 'type' => 'boolean', 'description' => 'Delete a coupon as soon as its maximum usage is reached.' ], 'max_uses_per_user' => [ 'label' => 'Max Uses Per User', 'type' => 'number', 'description' => 'Maximum number of uses that a user can make of the same coupon.' ], ]; } }