Commit 46bf23a74af6ce36b96ecdc28239eae4afecbfd1
1 parent
77f5d911ff
Exists in
master
and in
1 other branch
Добавление картинок - диалог
Showing 1 changed file with 9 additions and 11 deletions Side-by-side Diff
resources/views/employers/messages.blade.php
... | ... | @@ -105,17 +105,15 @@ |
105 | 105 | |
106 | 106 | |
107 | 107 | @if ($type_message == 'input') |
108 | - @if ($it->user_to->is_worker) | |
109 | - @if (isset($it->user_to->workers->photo)) | |
110 | - <img src="{{ asset(Storage::url($it->user_to->workers->photo)) }}" alt=""> | |
111 | - @elseif(isset($it->user_to->file)) | |
112 | - <img src="{{ asset(Storage::url($it->user_to->file)) }}" alt=""> | |
108 | + @if ($it->user_from->is_worker) | |
109 | + @if (isset($it->user_from->workers[0]->photo)) | |
110 | + <img src="{{ asset(Storage::url($it->user_from->workers[0]->photo)) }}" alt=""> | |
113 | 111 | @else |
114 | 112 | <img src="{{ asset('images/default_man.jpg') }}" alt=""> |
115 | 113 | @endif |
116 | 114 | @else |
117 | - @if (isset($it->user_to->employers->logo)) | |
118 | - <img src="{{ asset(Storage::url($it->user_to->employers->logo)) }}" alt=""> | |
115 | + @if (isset($it->user_from->employers[0]->logo)) | |
116 | + <img src="{{ asset(Storage::url($it->user_from->employers[0]->logo)) }}" alt=""> | |
119 | 117 | @else |
120 | 118 | <img src="{{ asset('images/default_man.jpg') }}" alt=""> |
121 | 119 | @endif |
... | ... | @@ -124,14 +122,14 @@ |
124 | 122 | |
125 | 123 | @if ($type_message == 'output') |
126 | 124 | @if ($it->user_from->is_worker) |
127 | - @if (isset($it->user_from->workers->photo)) | |
128 | - <img src="{{ asset(Storage::url($it->user_from->workers->photo)) }}" alt=""> | |
125 | + @if (isset($it->user_from->workers[0]->photo)) | |
126 | + <img src="{{ asset(Storage::url($it->user_from->workers[0]->photo)) }}" alt=""> | |
129 | 127 | @else |
130 | 128 | <img src="{{ asset('images/default_man.jpg') }}" alt=""> |
131 | 129 | @endif |
132 | 130 | @else |
133 | - @if (isset($it->user_from->employers->logo)) | |
134 | - <img src="{{ asset(Storage::url($it->user_from->employers->logo)) }}" alt=""> | |
131 | + @if (isset($it->user_from->employers[0]->logo)) | |
132 | + <img src="{{ asset(Storage::url($it->user_from->employers[0]->logo)) }}" alt=""> | |
135 | 133 | @else |
136 | 134 | <img src="{{ asset('images/default_man.jpg') }}" alt=""> |
137 | 135 | @endif |