| @@ 717-724 (lines=8) @@ | ||
| 714 | public function deleteStatuses($id) |
|
| 715 | { |
|
| 716 | try { |
|
| 717 | if ($id > 5) { |
|
| 718 | /* fetch the values of company from company table */ |
|
| 719 | \App\Model\helpdesk\Ticket\Ticket_Status::whereId($id)->delete(); |
|
| 720 | /* Direct to Company Settings Page */ |
|
| 721 | return redirect()->back()->with('success', Lang::get('lang.status_has_been_deleted')); |
|
| 722 | } else { |
|
| 723 | return redirect()->back()->with('failed', Lang::get('lang.you_cannot_delete_this_status')); |
|
| 724 | } |
|
| 725 | } catch (Exception $e) { |
|
| 726 | return redirect()->back()->with('fails', $e->getMessage()); |
|
| 727 | } |
|
| @@ 176-183 (lines=8) @@ | ||
| 173 | public function deleteStatuses($id) |
|
| 174 | { |
|
| 175 | try { |
|
| 176 | if ($id > 5) { |
|
| 177 | /* fetch the values of company from company table */ |
|
| 178 | \App\Model\helpdesk\Ticket\Ticket_Status::whereId($id)->delete(); |
|
| 179 | /* Direct to Company Settings Page */ |
|
| 180 | return redirect()->back()->with('success', 'Status has been deleted'); |
|
| 181 | } else { |
|
| 182 | return redirect()->back()->with('failed', 'You cannot delete this status'); |
|
| 183 | } |
|
| 184 | } catch (Exception $e) { |
|
| 185 | return redirect()->back()->with('fails', $e->errorInfo[2]); |
|
| 186 | } |
|