#5088 Sistem durumu silinmemeli

This commit is contained in:
Dia 2022-01-10 11:50:31 +03:00
parent cccddf658d
commit 7dd7d2c807
2 changed files with 9 additions and 0 deletions

View File

@ -36,4 +36,5 @@ return [
'currency_converter_not_available' => 'The currency converter is not available.', 'currency_converter_not_available' => 'The currency converter is not available.',
'option_saved' => 'Option Saved', 'option_saved' => 'Option Saved',
'do_you_want_to_save_the_option' => 'Do you want to save the option?', 'do_you_want_to_save_the_option' => 'Do you want to save the option?',
'you_can_not_delete_a_system_status' => 'You can not delete a system status!',
]; ];

View File

@ -1,8 +1,16 @@
<?php namespace Visiosoft\AdvsModule\Status; <?php namespace Visiosoft\AdvsModule\Status;
use Anomaly\Streams\Platform\Entry\Contract\EntryInterface;
use Anomaly\Streams\Platform\Entry\EntryObserver; use Anomaly\Streams\Platform\Entry\EntryObserver;
class StatusObserver extends EntryObserver class StatusObserver extends EntryObserver
{ {
public function deleting(EntryInterface $entry)
{
if ($entry->is_system) {
abort(403, trans('visiosoft.module.advs::message.you_can_not_delete_a_system_status'));
}
parent::deleting($entry);
}
} }