Commit b2d6fbf8432f1c151cb79912da66dc538449dbe3
1 parent
7f346848df
Exists in
master
fix chat
Showing 2 changed files with 3 additions and 5 deletions Side-by-side Diff
app/Models/Chat.php
... | ... | @@ -65,10 +65,7 @@ class Chat extends Model |
65 | 65 | |
66 | 66 | public static function get_user_chats(int $user_id){ |
67 | 67 | return Chat::query() |
68 | - ->with('user') | |
69 | - ->with('worker') | |
70 | - ->with('employer') | |
71 | - ->with('last_message') | |
68 | + ->with(['user', 'worker', 'employer', 'last_message']) | |
72 | 69 | ->withCount(['unread_messages' => function ($query) use($user_id) { |
73 | 70 | $query |
74 | 71 | ->where('to_user_id', '=', $user_id) |
... | ... | @@ -76,6 +73,7 @@ class Chat extends Model |
76 | 73 | ->where('flag_new', '=', 1) |
77 | 74 | ; |
78 | 75 | }]) |
76 | + ->whereHas('user') | |
79 | 77 | ->where('user_id', '=', $user_id) |
80 | 78 | ->where('is_removed', '=', 0) |
81 | 79 | ->orderByDesc('is_fixed') |
resources/views/employers/cabinet.blade.php
... | ... | @@ -71,7 +71,7 @@ |
71 | 71 | <div class="cabinet__avatar-form"> |
72 | 72 | <label class="file"> |
73 | 73 | <span class="file__input"> |
74 | - <input type="file" name="logo"> | |
74 | + <input type="file" name="logo" accept=".svg, .jpg, .png или .jpeg" capture="camera"> | |
75 | 75 | <span class="button"> |
76 | 76 | <svg> |
77 | 77 | <use xlink:href="{{ asset('images/sprite.svg#plus') }}"></use> |