editButton(route('admin.sant.vihar.edit', [$this->sant->id, $this->id]), 'Edit Vihar'); } /** * @return string */ public function getViharCheckboxActionAttribute(): string { return $this->checkboxAction($this); } /** * @return string */ public function getViharActionButtonsAttribute(): string { $action = $this->vihar_vihar_list_action; $action .= $this->vihar_edit_action; // $action =$action.$this->vihar_view_action; // if (loggedInUser()->isSuperAdmin() || loggedInUser()->isAdmin()) { // $action =$action.$this->vihar_delete_action; // } return $action; } /** * Get vihar live status * @return int */ public function getLiveViharAttribute(): int { $live = Vihar::where('start_date', '=', Carbon::now()->toDateString()) ->where('start_time', '<=', Carbon::now()->toTimeString()) ->where('sant_id', $this->sant_id) ->find($this->id); if ($live) { return Constant::STATUS_ONE; } else { return Constant::STATUS_ZERO; } } }