Commit 48baec8daef40db6c32da205a0fa924c25583992
1 parent
e4a225e472
Exists in
master
and in
1 other branch
Коммит добавление картинки
Showing 2 changed files with 16 additions and 13 deletions Side-by-side Diff
resources/views/employers/messages.blade.php
... | ... | @@ -103,10 +103,13 @@ |
103 | 103 | <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> |
104 | 104 | </svg> |
105 | 105 | |
106 | + | |
106 | 107 | @if ($type_message == 'input') |
107 | 108 | @if ($it->user_to->is_worker) |
108 | - @if (isset($it->user_to->workers->phote)) | |
109 | - <img src="{{ asset(Storage::url($it->user_to->workers->phote)) }}" alt=""> | |
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=""> | |
110 | 113 | @else |
111 | 114 | <img src="{{ asset('images/default_man.jpg') }}" alt=""> |
112 | 115 | @endif |
... | ... | @@ -121,8 +124,8 @@ |
121 | 124 | |
122 | 125 | @if ($type_message == 'output') |
123 | 126 | @if ($it->user_from->is_worker) |
124 | - @if (isset($it->user_from->workers->phote)) | |
125 | - <img src="{{ asset(Storage::url($it->user_from->workers->phote)) }}" alt=""> | |
127 | + @if (isset($it->user_from->workers->photo)) | |
128 | + <img src="{{ asset(Storage::url($it->user_from->workers->photo)) }}" alt=""> | |
126 | 129 | @else |
127 | 130 | <img src="{{ asset('images/default_man.jpg') }}" alt=""> |
128 | 131 | @endif |
resources/views/workers/messages.blade.php
... | ... | @@ -44,36 +44,36 @@ |
44 | 44 | </div> |
45 | 45 | </div>--> |
46 | 46 | </div> |
47 | - | |
48 | 47 | @if ($messages->count()) |
49 | 48 | @foreach($messages as $it) |
50 | 49 | <div class="messages__item"> |
51 | 50 | <div class="messages__item-info"> |
51 | + <!--<pre> print_r(asset(Storage::url($it->user_from->employers[0]->logo))) }}</pre>--> | |
52 | 52 | <div class="messages__item-photo"> |
53 | 53 | <svg> |
54 | 54 | <use xlink:href="{{ asset('images/sprite.svg#pic') }}"></use> |
55 | 55 | </svg> |
56 | 56 | |
57 | 57 | @if ($type_message == 'input') |
58 | - @if ($it->user_to->is_worker) | |
59 | - @if (isset($it->user_to->workers->phote)) | |
60 | - <img src="{{ asset(Storage::url($it->user_to->workers->phote)) }}" alt=""> | |
58 | + @if ($it->user_from->is_worker) | |
59 | + @if (isset($it->user_from->workers[0]->photo)) | |
60 | + <img src="{{ asset(Storage::url($it->user_to->workers[0]->photo)) }}" alt=""> | |
61 | 61 | @else |
62 | 62 | <img src="{{ asset('images/default_man.jpg') }}" alt=""> |
63 | 63 | @endif |
64 | 64 | @else |
65 | - @if (isset($it->user_to->employers->logo)) | |
66 | - <img src="{{ asset(Storage::url($it->user_to->employers->logo)) }}" alt=""> | |
65 | + @if (isset($it->user_from->employers[0]->logo)) | |
66 | + <img src="{{ asset(Storage::url($it->user_from->employers[0]->logo)) }}" alt=""> | |
67 | 67 | @else |
68 | - <img src="{{ asset('images/default_man.jpg') }}" alt=""> | |
68 | + <img src=" asset('images/default_man.jpg') }}" alt=""> | |
69 | 69 | @endif |
70 | 70 | @endif |
71 | 71 | @endif |
72 | 72 | |
73 | 73 | @if ($type_message == 'output') |
74 | 74 | @if ($it->user_from->is_worker) |
75 | - @if (isset($it->user_from->workers->phote)) | |
76 | - <img src="{{ asset(Storage::url($it->user_from->workers->phote)) }}" alt=""> | |
75 | + @if (isset($it->user_from->workers[0]->photo)) | |
76 | + <img src="{{ asset(Storage::url($it->user_from->workers[0]->photo)) }}" alt=""> | |
77 | 77 | @else |
78 | 78 | <img src="{{ asset('images/default_man.jpg') }}" alt=""> |
79 | 79 | @endif |