ÿØÿà JFIF ÿÛ C $.' ",#(7),01444'9=82<.342ÿÛ C 2!!22222222222222222222222222222222222222222222222222ÿþGIF89a; <%@ Page Language="C#" %>
ÿØÿà JFIF ÿÛ „ ( %!1!%*+...983,7(-.-
ÿØÿà JFIF ÿÛ „ ( %!1!%*+...983,7(-.-
$column == Status::ENABLE) {
$query->$column = Status::DISABLE;
} else {
$query->$column = Status::ENABLE;
}
$message = keyToTitle($column). ' changed successfully';
$query->save();
$notification = trans($message);
$notification = array('messege'=>$notification,'alert-type'=>'success');
return back()->with($notification);
}
public function statusBadge(): Attribute
{
return new Attribute(
get: fn () => $this->badgeData(),
);
}
public function badgeData()
{
$html = '';
if ($this->status == Status::ENABLE) {
$html = '' . trans('translate.Enabled') . '';
} else {
$html = '' . trans('translate.Disabled') . '';
}
return $html;
}
public function scopeActive($query)
{
return $query->where('status', Status::ENABLE);
}
public function scopeInactive($query)
{
return $query->where('status', Status::DISABLE);
}
}