Commit 5f72758005a686a0ce6d0add9ac5e8fcdd596084
1 parent
2a5b45db10
Exists in
master
Коммит 19 марта
Showing 4 changed files with 69 additions and 3 deletions Side-by-side Diff
app/Models/Employer.php
database/migrations/2024_03_15_035922_alter_table_employers.php
... | ... | @@ -0,0 +1,34 @@ |
1 | +<?php | |
2 | + | |
3 | +use Illuminate\Database\Migrations\Migration; | |
4 | +use Illuminate\Database\Schema\Blueprint; | |
5 | +use Illuminate\Support\Facades\Schema; | |
6 | + | |
7 | +return new class extends Migration | |
8 | +{ | |
9 | + /** | |
10 | + * Run the migrations. | |
11 | + * | |
12 | + * @return void | |
13 | + */ | |
14 | + public function up() | |
15 | + { | |
16 | + Schema::table('employers', function (Blueprint $table) { | |
17 | + $table->string('email_2', 255)->nullable(true); | |
18 | + $table->string('telephone_2', 255)->nullable(true); | |
19 | + }); | |
20 | + } | |
21 | + | |
22 | + /** | |
23 | + * Reverse the migrations. | |
24 | + * | |
25 | + * @return void | |
26 | + */ | |
27 | + public function down() | |
28 | + { | |
29 | + Schema::table('employers', function (Blueprint $table) { | |
30 | + $table->dropColumn('email_2'); | |
31 | + $table->dropColumn('telephone_2'); | |
32 | + }); | |
33 | + } | |
34 | +}; |
resources/views/companies.blade.php
... | ... | @@ -123,9 +123,13 @@ |
123 | 123 | <div class="main__employers-item"> |
124 | 124 | <span class="main__employers-item-inner"> |
125 | 125 | @if (!empty($emp->logo)) |
126 | - <img src="{{ asset(Storage::url($emp->logo)) }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic"> | |
126 | + <a href="{{ route('info_company', ['company' => $emp->id]) }}"> | |
127 | + <img src="{{ asset(Storage::url($emp->logo)) }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic"> | |
128 | + </a> | |
127 | 129 | @else |
128 | - <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic"> | |
130 | + <a href="{{ route('info_company', ['company' => $emp->id]) }}"> | |
131 | + <img src="{{ asset('images/default_ship.jpg') }}" alt="{{ $emp->name_company }}" class="main__employers-item-pic"> | |
132 | + </a> | |
129 | 133 | @endif |
130 | 134 | <span class="main__employers-item-body"> |
131 | 135 | <b>{{ $emp->name_company }}</b> |
resources/views/employers/cabinet45.blade.php
... | ... | @@ -89,6 +89,19 @@ |
89 | 89 | @enderror |
90 | 90 | </div> |
91 | 91 | </div> |
92 | + | |
93 | + <div class="cabinet__inputs-item form-group"> | |
94 | + <label class="form-group__label">Электронная почта (alt)</label> | |
95 | + <div class="form-group__item"> | |
96 | + <input type="email" name="email_2" class="input" placeholder="info@rekamore.su" value="{{ old('email_2') ?? $Employer[0]->email_2 ?? '' }}"> | |
97 | + @error('email') | |
98 | + <span class="text-xs text-red-600"> | |
99 | + {{ $message }} | |
100 | + </span> | |
101 | + @enderror | |
102 | + </div> | |
103 | + </div> | |
104 | + | |
92 | 105 | <div class="cabinet__inputs-item form-group"> |
93 | 106 | <label class="form-group__label">Номер телефона</label> |
94 | 107 | <div class="form-group__item"> |
... | ... | @@ -100,6 +113,19 @@ |
100 | 113 | @enderror |
101 | 114 | </div> |
102 | 115 | </div> |
116 | + | |
117 | + <div class="cabinet__inputs-item form-group"> | |
118 | + <label class="form-group__label">Номер телефона (alt)</label> | |
119 | + <div class="form-group__item"> | |
120 | + <input type="tel" name="telephone_2" class="input" placeholder="+7 (___) ___-__-__" value="{{ old('telephone_2') ?? $Employer[0]->telephone_2 ?? '' }}"> | |
121 | + @error('telephone') | |
122 | + <span class="text-xs text-red-600"> | |
123 | + {{ $message }} | |
124 | + </span> | |
125 | + @enderror | |
126 | + </div> | |
127 | + </div> | |
128 | + | |
103 | 129 | <div class="cabinet__inputs-item form-group"> |
104 | 130 | <label class="form-group__label">Адрес компании</label> |
105 | 131 | <div class="form-group__item"> |