From 748f122fa7bf40cd5e9809a09b5f70d1bc3e7d17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9=20=20=D0=9B=D0=B0=D1=80?= =?UTF-8?q?=D0=B8=D0=BE=D0=BD=D0=BE=D0=B2?= Date: Tue, 14 May 2024 17:24:05 +0700 Subject: [PATCH] =?UTF-8?q?=D0=9A=D0=BE=D0=BC=D0=BC=D0=B8=D1=82=20=D0=BF=D0=BE?= =?UTF-8?q?=20=D0=B4=D0=BE=D0=BA=D1=83=D0=BC=D0=B5=D0=BD=D1=82=D0=B0=D0=BC=20?= =?UTF-8?q?=D0=B2=20=D0=B8=D0=BD=D1=84=D0=BE=D0=B1=D0=BB=D0=BE=D0=BA=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Models/Ad_employer.php | 1 - app/Models/infobloks.php | 8 ++++++++ resources/views/worker.blade.php | 6 ++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/app/Models/Ad_employer.php b/app/Models/Ad_employer.php index 6c7de72..da5db3e 100644 --- a/app/Models/Ad_employer.php +++ b/app/Models/Ad_employer.php @@ -59,7 +59,6 @@ class Ad_employer extends Model return $this->hasMany(Category::class, 'id'); } - public function scopeActive($query) { return $query->where('is_remove', '=', '0'); } diff --git a/app/Models/infobloks.php b/app/Models/infobloks.php index fd768aa..8444041 100644 --- a/app/Models/infobloks.php +++ b/app/Models/infobloks.php @@ -18,4 +18,12 @@ class infobloks extends Model public function ScopeActive($query) { return $query->where('is_remove', '=', '0'); } + + /* + * Связь модели Инфоблоки (Infobloks) с моделью Доп.информация (dop_info) + один-ко-многим + */ + public function model_dop_info() { + return $this->hasMany(dop_info::class, 'infoblok_id'); + } } diff --git a/resources/views/worker.blade.php b/resources/views/worker.blade.php index 1fa7580..dc37b8f 100644 --- a/resources/views/worker.blade.php +++ b/resources/views/worker.blade.php @@ -235,6 +235,12 @@ Документ: {{ $it->name }} + + @if ($it->model_dop_info[0]->status == 0) Не указано + @elseif($it->model_dop_info[0]->status==1) В наличии + @else Отсутствует + @endif + @endforeach -- 1.7.10.4