'info', 1 => 'store_payment', 2 => 'checkout_payment', 3 => 'payment_error', 4 => 'payment_redirect', 5 => 'payment_approved', 6 => 'txaction_failed', 7 => 'txaction_appointed', 8 => 'txaction_paid', 9 => 'success_payment', 10 => 'success', 21 => 'payment_not_found', 22 => 'checkout_cancel', 23 => 'checkout_error', 31 => 'reminder_first', 32 => 'reminder_first_sepa', 33 => 'reminder_sec', 34 => 'reminder_last', 35 => 'reminder_deaktiv', 36 => 'reminder_deaktiv_sepa', 37 => 'reminder_collect_sepa', 50 => 'delete_membership' ]; protected $status_colors = [ 0 => 'info', 1 => 'warning', 2 => 'warning', 3 => 'danger', 4 => 'warning', 5 => 'warning', 6 => 'danger', 7 => 'warning', 8 => 'success', 9 => 'secondary', 10 => 'success', 21 => 'danger', 22 => 'danger', 23 => 'danger', ]; protected $casts = [ 'user_id' => 'int', 'shopping_order_id' => 'int', 'product_id' => 'int', 'referenz' => 'int', 'status' => 'int' ]; protected $fillable = [ 'user_id', 'shopping_order_id', 'product_id', 'action', 'referenz', 'identifier', 'abo_options', 'status' ]; public function product() { return $this->belongsTo(Product::class); } public function shopping_order() { return $this->belongsTo(ShoppingOrder::class); } public function user() { return $this->belongsTo(User::class); } public function getStatusType(){ if(isset($this->status_types[$this->status])){ return $this->status_types[$this->status]; } } public function getStatusColor(){ if(isset($this->status_colors[$this->status])){ return $this->status_colors[$this->status]; } return 'default'; } }