Commit ad1c26f2fbceffe553b0c4d0c1c6f304b4f34d8e

Authored by Андрей Ларионов
1 parent 3575d19ae6
Exists in master

Админка - контакты компании

Showing 2 changed files with 8 additions and 1 deletions Side-by-side Diff

app/Http/Controllers/Admin/CompanyAreaController.php
... ... @@ -88,7 +88,8 @@ class CompanyAreaController extends Controller
88 88 ->withErrors($validator);
89 89 } else {
90 90 $params = $request->all();
91   - $contact->update($params);
  91 + $company = Contact::find(1);
  92 + $company->update($params);
92 93 return redirect()->route('admin.company.show', ['company' => 1]);
93 94 }
94 95 }
app/Models/Contact.php
... ... @@ -8,4 +8,10 @@ use Illuminate\Database\Eloquent\Model;
8 8 class Contact extends Model
9 9 {
10 10 use HasFactory;
  11 +
  12 + protected $fillable = ['email', 'telephone', 'title', 'title_t', 'description',
  13 + 'whatapp', 'telegram', 'title1', 'title2', 'title3', 'text1', 'text2', 'text3',
  14 + 'year', 'conf'
  15 + ];
  16 +
11 17 }