Редактор карты зала
Электронные заказы
Отчет по удалениям
This commit is contained in:
miroman-afk
2022-09-22 16:34:02 +03:00
parent 1af2b267f5
commit dcd0e72d1f
43 changed files with 2481 additions and 727 deletions

24
models/Reasons.php Normal file
View File

@@ -0,0 +1,24 @@
<?php
namespace App\Component\Models;
use Illuminate\Database\Eloquent\Model;
class Reasons extends Model {
protected $table = 'reasons';
public static function getName($data) {
$reason_name = Reasons::where('code', intval($data))->where('is_history', 0)->first();
if ($reason_name) {
$reason_name = $reason_name['name'];
} else {
$reason_name = Reasons::where('code', intval($data))->where('is_history', 1)->first();
if ($reason_name) {
$reason_name = $reason_name['name'];
} else {
$reason_name = 'Связанная причина удаления не найдена';
}
}
return $reason_name;
}
}